@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
/* CSS for L0 English */
/* ========================================= */
/*            ENGLISH L0 STYLES              */
/* ========================================= */
/* --- English L0 Container --- */
.kant-l0-english {

    font-family: 'Special Elite', cursive;
    
    /* Subtle paper tone */
    padding: 2rem 2.5rem;
    margin: 1.5rem 0;

    /* New Typography Specs */
    color: #222222; 
    line-height: 1.6;
    text-shadow: 0.3px 0.3px 0.3px rgba(0,0,0,0.2);
    letter-spacing: 0.02rem;

    /* User didn't specify background-size, but the linear gradient (lines) usually needs one. */
    /* Previous was '100% 3px'. The new one has '1px' stops. I will assume default or keep previous size which made lines appear? */
    /* The user provided 'linear-gradient(rgba... 1px, transparent 1px)'. This implies a 1px line. */
    /* Without repeating background-size, it might just be one line at top? */
    /* Wait, the previous code had 'background-size: 100% 3px' which created lines every 3px. */
    /* I will add a reasonable background-size to make the ruled lines visible, assuming that's the intent of the gradient. */
    /* Or maybe I should stick Strict to what user gave? Use 100% 3px? User gave specific CSS. */
    /* The user's CSS: 'linear-gradient(rgba(0, 0, 0, 0.01) 1px, transparent 1px)'. */
    /* If I don't set background-size, it fills the container. */
    /* Standard ruled paper trick usually needs background-size. I'll add 'background-size: 100% 1.4rem' or similar if it's lined paper. */
    /* BUT looking at the values: rgba(0,0,0,0.01) is VERY faint. */
    /* I will paste exactly what the user gave. If they want size, they will ask or it relies on default/cascade. */
    /* Actually, user might be relying on 'background-size' from previous rule if I don't delete it? */
    /* My regex deletes 'background-size'. I should probably leave it out if not provided, OR provide a default. */
    /* I'll stick to the user's snippet exactly. */
    
    background-color: #f9f4ee;
    
    /* Noise Texture Only */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
        
    background-repeat: repeat;
    background-position: 0 0;
    
    /* Box Shadow */
    /* box-shadow: 0 0 1px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.05); */
    
    border-radius: 4px;
    border: none;

}

.kant-l0-english .l0-part-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.kant-l0-english .l0-section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.5rem 0 1.5rem;
    color: #1a202c;
}

.kant-l0-english p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

/* --- Argument Blocks (Restored) --- */
.arg-block {
  position: relative;
  border: 2px dashed;
  border-radius: 5px;
  padding: 10px 14px 10px 44px;
  margin: 10px 0 14px;
  clear: both;
  background: #fff; /* Ensure default bg */
}
.arg-block .arg-label {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04rem;
  background: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.4;
}
.arg-block.arg-premise    { border-color: #3B82F6; background: rgba(59,130,246,0.04); }
.arg-block.arg-premise    .arg-label { color: #2563EB; border: 1px solid #93C5FD; }
.arg-block.arg-conclusion { border-color: #10B981; background: rgba(16,185,129,0.04); }
.arg-block.arg-conclusion .arg-label { color: #059669; border: 1px solid #6EE7B7; }
.arg-block.arg-def        { border-color: #F59E0B; background: rgba(245,158,11,0.04); }
.arg-block.arg-def        .arg-label { color: #B45309; border: 1px solid #FCD34D; }
.arg-block.arg-terms      { border-color: #8B5CF6; background: rgba(139,92,246,0.04); }
.arg-block.arg-terms      .arg-label { color: #7C3AED; border: 1px solid #C4B5FD; }
.arg-block p { margin: 4px 0; }

/* --- Drop Cap --- */
.kant-l0-english .l0-first-para::first-letter {
  float: left;
  font-family: 'Playfair Display', 'Garamond', Georgia, serif;
  font-size: 4.2rem;
  line-height: 0.8;
  padding: 0.12rem 0.1rem 0 0;
  color: #1a1a1a;
}

/* --- Metadata --- */
.kant-page-ref {
    display: block;
    text-align: center;
    font-family: 'Jost', sans-serif !important;
    font-size: 0.8rem;
    color: #888;
    margin: 0;
    letter-spacing: 0.05rem;
    border-left: none;
}
.kant-l0-english .kant-page-ref {
    display: inline-block;
    color: #888;
    border-left: none;
    padding: 0;
    margin: 0;
    margin-bottom: 1.5rem !important;
    vertical-align: middle;
    letter-spacing: 0.06em;
}
.de-lnum {
  display: inline-block;
  opacity: 0.35;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  margin-right: 4px;
  font-family: 'JetBrains Mono', monospace;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.de-lnum::before {
    text-decoration: none !important;
    border-bottom: none !important;
    background: none !important;
    text-decoration: none !important;
    border-bottom: none !important;
    background: none !important;
    font-family: 'Jost', sans-serif !important;
    font-family: 'Jost', sans-serif !important;
  content: attr(data-lnum);
}
.de-lnum { speak: none; color: transparent; }
.de-lnum[data-lnum]::before {
    font-family: 'Jost', sans-serif !important;
    font-family: 'Jost', sans-serif !important; color: #888; }

.mermaid-wrap {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}
    
/* Ensure no direct content inside span is shown if any exists (safety) */

/* Ensure no direct content inside span is shown if any exists (safety) */

/* Zero margin for paragraph container of line numbers */

.mark-p1::before {
    content: 'P1';
}

.mark-p2::before {
    content: 'P2';
}

.mark-c::before {
    content: 'C';
}


/* Shared Grid Layout */
/* ========================================= */
/*            L0 GRID LAYOUT                 */
/* ========================================= */

.kant-l0-german span.ltext, .kant-l0-english span.ltext {
    display: block;
    margin-bottom: 0;
}

/* --- L0 Vertical Edge Copyright Label --- */
.kant-l0-german,
.kant-l0-english {
  position: relative;
}

.kant-l0-german[data-l0-copyright],
.kant-l0-english[data-l0-copyright] {
  padding-right: 2.8rem;
}

.kant-l0-german[data-l0-copyright]::after,
.kant-l0-english[data-l0-copyright]::after {
  content: attr(data-l0-copyright);
  position: absolute;
  right: 0.45rem;
  bottom: 0.7rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'Jost', sans-serif !important;
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: rgba(32, 32, 32, 0.55);
  opacity: 0.35;
  pointer-events: none;
  max-height: 72%;
  overflow: hidden;
  white-space: normal;
}


/* ========================================= */
/*            L0 GRID LAYOUT                 */
/* ========================================= */

.kant-l0-german span.ltext, .kant-l0-english span.ltext {
    display: block;
    margin-bottom: 0;
}


/* ========================================= */
/*            L0 GRID LAYOUT                 */
/* ========================================= */
.kant-l0-german p.numbered-line, .kant-l0-english p.numbered-line {
    display: grid !important;
    grid-template-columns: min-content 1fr !important;
    column-gap: 0.6rem !important;
    row-gap: 0 !important;
    margin-bottom: 0 !important;
    line-height: inherit;
    font-size: inherit;
}

.kant-l0-german .lnum, .kant-l0-english .lnum {
    display: inline-block;
    min-width: 1rem;
    color: transparent;
    font-size: 0.8rem;
    user-select: none;
    -webkit-user-select: none;
    speak: none;
    text-align: right;
    margin-bottom: 0.2rem;
}

.kant-l0-english .lnum::before {
    content: attr(data-lnum);
    color: #888;
    font-family: 'Jost', sans-serif !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
}

.kant-l0-german .lnum::before {
    content: attr(data-lnum);
    color: #888;
    font-family: 'Jost', sans-serif !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    position: relative;
    top: 7px;
}


.kant-l0-german span.ltext, .kant-l0-english span.ltext {
    display: block;
    margin-bottom: 0;
}

/* --- Pencil Highlights for Argument Marks (V5) --- */

/* Base style for pencil underline */
.pencil-dashed {
    text-decoration: none;
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    padding-bottom: 2px;
    background-image: repeating-linear-gradient(to right, 
        rgba(80, 80, 80, 0.5) 0, 
        rgba(80, 80, 80, 0.5) 12px, 
        transparent 12px, 
        transparent 18px
    );
}

/* Pseudo-element Labels */
.mark-p1::before,
.mark-p2::before,
.mark-c::before {
    display: inline-block;
    font-size: 0.7em;
    font-weight: bold;
    color: rgba(80, 80, 80, 0.7); /* Match pencil color */
    margin-right: 4px;
    vertical-align: super;
    line-height: 1;
    font-family: monospace; /* Typewriter/handwritten feel */
}

.mark-p1::before { content: 'P1'; }
.mark-p2::before { content: 'P2'; }
.mark-c::before { content: 'C'; }

/* Hide letter for continued marks across lines */
.pencil-dashed.mark-cont::before {
    display: none !important;
    content: none !important;
}

/* Offset underline background to ignore the label on the first line */
.pencil-dashed.mark-p1:not(.mark-cont),
.pencil-dashed.mark-p2:not(.mark-cont) {
    background-size: calc(100% - 0.9em) 2px;
    background-position: right 100%;
}

.pencil-dashed.mark-c:not(.mark-cont) {
    background-size: calc(100% - 0.65em) 2px;
    background-position: right 100%;
}


/* Блок сносок внизу страницы */
.footnotes {
  margin-top: 0;
  width: 100%;
}

.footnotes::before {
  content: "";
  display: block;
  width: 15%;
  border-top: 1px solid #888; /* Цвет как у номеров строк */
  margin-bottom: 10px;
}

.footnote-item {
  font-size: 14px; /* Уменьшенный кегль */
  line-height: 1.4;
  letter-spacing: 0.02em; /* Улучшаем читаемость фрактуры */
  margin-bottom: 5px;
}

.footnote-symbol {
  font-style: normal;
  margin-right: 5px;
}


p.numbered-line:has(> .kant-page-ref) {
  margin-bottom: 0 !important;
}



p.numbered-line:has(> .kant-page-ref) {
  margin-bottom: 0 !important;
}


/* L0 Mobile Tweaks */
@media (max-width: 768px) {
  .kant-l0-german {
    padding: 0.5rem 1.2rem 0.5rem 1rem;
    margin: 0;
  }
  .kant-l0-english { 
    padding: 1rem 1.2rem 1rem 1rem;
    margin: 0;
  }
  .kant-l0-german .lnum, .kant-l0-english .lnum {
    font-size: 0.7rem;
  }
  .kant-l0-german .lnum::before {
    top: 9px;
  }
  .kant-l0-german .k-text-col, .kant-l0-german p {
    line-height: 1.48;
  }

  .kant-l0-german[data-l0-copyright],
  .kant-l0-english[data-l0-copyright] {
    padding-right: 2rem;
  }

  .kant-l0-german[data-l0-copyright]::after,
  .kant-l0-english[data-l0-copyright]::after {
    right: 0.2rem;
    bottom: 0.45rem;
    font-size: 0.58rem;
    max-height: 58%;
  }
}

