/* ==========================================================================
   Deutsch Lernen — article pages
   Loaded on top of app.css, which supplies the design tokens. These pages
   are static HTML and must read correctly with JavaScript disabled, so
   nothing here depends on a script having run.
   ========================================================================== */

body.doc{display:flex;flex-direction:column;min-height:100vh;padding-bottom:0}

/* ---------------------------------------------------------------- chrome */
.doc-top{
  position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:16px;
  height:60px;padding:0 clamp(14px,3vw,28px);
  background:color-mix(in srgb,var(--paper) 86%,transparent);
  backdrop-filter:saturate(150%) blur(12px);
  border-bottom:1px solid var(--line);
}
.doc-nav{margin-inline-start:auto;display:flex;gap:6px;flex-wrap:wrap}
.doc-nav a{
  padding:7px 14px;border-radius:var(--r-pill);font-weight:600;font-size:14px;
  color:var(--ink-soft);text-decoration:none;transition:all var(--dur) var(--ease)}
.doc-nav a:hover{background:var(--teal-soft);color:var(--teal)}

/* ------------------------------------------------------------------ main */
.doc-main{flex:1;width:100%;max-width:760px;margin:0 auto;padding:36px clamp(16px,4vw,24px) 60px}
.doc-crumb{display:flex;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:18px}
.doc-crumb a{color:var(--muted);text-decoration:none}
.doc-crumb a:hover{color:var(--teal)}
.doc-crumb span{opacity:.5}

.doc-kicker{
  display:inline-block;font-size:12px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;
  color:var(--teal);background:var(--teal-soft);padding:5px 13px;border-radius:var(--r-pill);margin-bottom:16px}
.doc-article h1{font-size:clamp(1.75rem,1.2rem + 2.2vw,2.6rem);line-height:1.14;margin-bottom:16px}
.doc-lede{font-size:clamp(1.02rem,.98rem + .3vw,1.18rem);line-height:1.6;color:var(--ink-soft);margin-bottom:14px}
.doc-meta{font-size:13.5px;color:var(--muted);font-weight:500;margin-bottom:30px}

/* table of contents */
.doc-toc{background:var(--card);border:1px solid var(--line);border-radius:var(--r-l);padding:18px 22px;margin-bottom:34px}
.doc-toc-t{font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.doc-toc ol{margin:0;padding-inline-start:20px;display:flex;flex-direction:column;gap:7px}
.doc-toc a{color:var(--ink-soft);text-decoration:none;font-size:14.5px;font-weight:500}
.doc-toc a:hover{color:var(--teal);text-decoration:underline}

/* ------------------------------------------------------------------ body */
.doc-body{font-size:17px;line-height:1.75;color:var(--ink)}
.doc-body p{margin-bottom:20px}
.doc-body h2{font-size:clamp(1.3rem,1.1rem + .8vw,1.6rem);margin:44px 0 14px;scroll-margin-top:76px}
.doc-body h3{font-size:1.12rem;margin:30px 0 10px;scroll-margin-top:76px}
.doc-body ul,.doc-body ol{margin:0 0 22px;padding-inline-start:24px;display:flex;flex-direction:column;gap:9px}
.doc-body li{line-height:1.7}
.doc-body a{color:var(--teal);font-weight:500;text-decoration:underline;text-decoration-thickness:1.5px}
.doc-body a:hover{color:var(--teal-2)}
.doc-body strong{font-weight:700}
.doc-body em{font-style:italic}
.doc-body code{
  font-family:var(--font-m);font-size:.9em;background:var(--paper-2);
  padding:2px 7px;border-radius:6px;border:1px solid var(--line)}
.doc-body blockquote{
  margin:0 0 22px;padding:14px 20px;border-inline-start:4px solid var(--gold);
  background:var(--gold-soft);border-radius:0 var(--r-m) var(--r-m) 0;
  font-size:16px;line-height:1.65}
.doc-body hr{border:none;border-top:1px solid var(--line);margin:36px 0}
.doc-body .table-scroll{overflow-x:auto;margin-bottom:24px;border:1px solid var(--line);border-radius:var(--r-m)}
.doc-body table{border-collapse:collapse;width:100%;font-size:15px;min-width:420px}
.doc-body th,.doc-body td{padding:11px 15px;text-align:start;border-bottom:1px solid var(--line)}
.doc-body th{background:var(--card-2);font-weight:700;font-size:13.5px;white-space:nowrap}
.doc-body tr:last-child td{border-bottom:none}

.doc-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:36px}

/* ------------------------------------------------------- index + related */
.doc-hero{margin-bottom:44px}
.doc-hero h1{font-size:clamp(1.9rem,1.3rem + 2.4vw,2.8rem);margin-bottom:14px}
.doc-section{margin-bottom:44px}
.doc-section h2{font-size:1.35rem;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.doc-related{margin-top:56px;padding-top:36px;border-top:1px solid var(--line)}
.doc-related h2{font-size:1.3rem;margin-bottom:18px}
.doc-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.doc-card{
  display:flex;flex-direction:column;gap:7px;padding:20px;text-decoration:none;
  background:var(--card);border:1px solid var(--line);border-radius:var(--r-l);
  box-shadow:var(--sh-1);transition:all var(--dur) var(--ease)}
.doc-card:hover{box-shadow:var(--sh-2);transform:translateY(-2px);border-color:var(--line-2)}
.doc-card-cat{font-size:11.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.doc-card-t{font-family:var(--font-d);font-weight:700;font-size:1.03rem;line-height:1.3;color:var(--ink)}
.doc-card-d{font-size:13.5px;line-height:1.55;color:var(--muted)}

/* ---------------------------------------------------------------- footer */
.doc-foot{border-top:1px solid var(--line);background:var(--card);padding:44px clamp(16px,4vw,24px) 34px;margin-top:auto}
.doc-cta{max-width:760px;margin:0 auto 32px;text-align:center}
.doc-cta h2{font-size:clamp(1.3rem,1.1rem + .9vw,1.7rem);margin-bottom:12px}
.doc-cta p{color:var(--ink-soft);font-size:15px;line-height:1.65;margin-bottom:22px}
.doc-links{max-width:760px;margin:0 auto;display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.doc-links a{
  padding:7px 15px;border-radius:var(--r-pill);border:1px solid var(--line-2);
  font-size:13.5px;font-weight:600;color:var(--ink-soft);text-decoration:none;
  transition:all var(--dur) var(--ease)}
.doc-links a:hover{border-color:var(--teal);color:var(--teal)}
.doc-copy{text-align:center;font-size:13px;color:var(--muted);margin-top:26px}
.doc-copy a{color:var(--muted)}

@media (max-width:640px){
  .doc-nav a{padding:6px 10px;font-size:13px}
  .doc-body{font-size:16.5px}
}

/* ------------------------------------------------------- illustrations
   Original inline SVG rather than stock photography: nothing to license,
   no third-party host, and because it is inlined the design tokens from
   app.css cascade in, so the art recolours itself in dark mode. */
.doc-art{margin:0 0 34px}
.doc-art-svg{
  display:block;width:100%;height:auto;
  border:1px solid var(--line);border-radius:var(--r-l);
  background:var(--card-2);box-shadow:var(--sh-1)}
.doc-art figcaption{
  margin-top:11px;font-size:13px;line-height:1.55;color:var(--muted);
  text-align:center;padding:0 8px}

/* Cards on the hub carry a slim band of the same art as a preview */
.doc-card-art{
  display:block;width:100%;height:74px;border-radius:var(--r-m);
  overflow:hidden;margin-bottom:4px;background:var(--card-2);
  border:1px solid var(--line)}
.doc-card-art svg{display:block;width:100%;height:auto;margin-top:-6%}

@media (max-width:640px){
  .doc-art{margin-bottom:26px}
  .doc-art figcaption{font-size:12.5px}
}

/* The brand gold is tuned for fills and borders, not for small text: on the
   art panel it lands at 2.75:1, below the 4.5:1 AA needs. These are darker
   in light mode and lighter in dark mode, and are used for text only —
   shapes keep the brand colour. */
.doc-art-svg{--art-gold-ink:#7A5307;--art-violet-ink:#4A3BB0;--art-dim-ink:#565B6B;--art-coral-ink:#A63525}
@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]) .doc-art-svg{--art-gold-ink:#F2C863;--art-violet-ink:#B3A8F8;--art-dim-ink:#9AA5BA;--art-coral-ink:#F0725F}
}
html[data-theme="dark"] .doc-art-svg{--art-gold-ink:#F2C863;--art-violet-ink:#B3A8F8;--art-dim-ink:#9AA5BA;--art-coral-ink:#F0725F}

/* On a phone the 800-wide art scales to about 0.43, which drops the smallest
   label to roughly 5px — present but unreadable. Rather than strip detail out
   of the diagram, let it keep a legible width and scroll sideways, which is
   the same behaviour the vocabulary tables already have on this site. */
@media (max-width:700px){
  .doc-art{overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:thin;padding-bottom:6px}
  .doc-art-svg{min-width:700px}
  .doc-art figcaption{position:sticky;left:0;max-width:100vw}
  .doc-art::after{
    content:"swipe to see the whole diagram";
    display:block;position:sticky;left:0;max-width:100vw;
    font-size:11.5px;color:var(--muted);text-align:center;margin-top:6px}
}

/* A consent trigger sitting inside a sentence: it has to be a button for
   assistive tech, but it should read as a link. */
.doc-inline-btn{
  font:inherit;color:var(--teal);font-weight:500;cursor:pointer;
  background:none;border:none;padding:0;
  text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:3px}
.doc-inline-btn:hover{color:var(--teal-2)}
