/* Verbindung - verbindung.plutostudio.app

   The app is about one thing: which verb belongs with which noun. So the page
   is built around pairs. The recurring device is a wrong phrase set against a
   right one, because that contrast is the whole product and it explains itself
   without a paragraph of setup.

   Same token structure as the other studio sites: a full light palette on bare
   :root, only the changed tokens redefined for dark, and the explicit
   data-theme blocks so a chosen theme wins over the OS preference in both
   directions. No webfonts, no external requests. */

:root {
  --paper:      #FCFBFA;
  --paper-sunk: #F4F1EE;
  --ink:        #17130F;
  --ink-soft:   #3D362F;
  --muted:      #6E655C;
  --rule:       #E4DDD5;
  --accent:     #B8341F;
  --accent-dim: #FBEAE6;
  --right:      #1F6B45;
  --right-dim:  #E4F1EA;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;

  --col: 62ch;
  --wide: 70rem;
  --pad: clamp(1.15rem, 5vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #121010;
    --paper-sunk: #1B1817;
    --ink:        #F2EEEA;
    --ink-soft:   #CFC7BF;
    --muted:      #948A80;
    --rule:       #2E2926;
    --accent:     #F0705A;
    --accent-dim: #2E1712;
    --right:      #5FC994;
    --right-dim:  #10281D;
  }
}

:root[data-theme="dark"] {
  --paper:      #121010;
  --paper-sunk: #1B1817;
  --ink:        #F2EEEA;
  --ink-soft:   #CFC7BF;
  --muted:      #948A80;
  --rule:       #2E2926;
  --accent:     #F0705A;
  --accent-dim: #2E1712;
  --right:      #5FC994;
  --right-dim:  #10281D;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 2px; }

.wrap { max-width: var(--col); margin: 0 auto; padding: 0 var(--pad); }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad); }

section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.slab { background: var(--paper-sunk); border-block: 1px solid var(--rule); }

h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
  font-weight: 600;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 .8rem;
  font-weight: 600;
}
h3 { font-size: 1rem; margin: 0 0 .35rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }
.muted { color: var(--muted); }

/* The wrong/right pair. The struck phrase carries no colour of its own so the
   eye lands on the correct one, which is the point being made. */
.pair {
  display: grid;
  gap: .3rem;
  margin: 1.6rem 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
}
.pair-wrong { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.pair-right { color: var(--accent); font-weight: 600; }
.pair-note { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: .2rem; }

.rule-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .45rem; margin-bottom: 1.6rem;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}

.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 1.1rem 1.2rem; background: var(--paper);
}
.card p:last-child { margin-bottom: 0; }
.card .de { font-family: var(--serif); color: var(--accent); font-size: 1.05rem; }

.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .75rem;
         grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.facts li { border-left: 2px solid var(--accent); padding-left: .7rem; }
.facts b { display: block; font-size: 1.35rem; font-family: var(--serif); line-height: 1.1; }
.facts span { font-size: .82rem; color: var(--muted); }

.cta { text-align: center; }
.btn {
  display: inline-block; background: var(--accent); color: var(--paper);
  font-weight: 600; text-decoration: none; border-radius: 10px;
  padding: .75rem 1.5rem; font-size: 1.02rem;
}
.btn:hover { filter: brightness(1.08); }
.cta-note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }

.tiers { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.tiers li { border-top: 1px solid var(--rule); padding: .7rem 0; display: grid;
            gap: .15rem; grid-template-columns: 8.5rem 1fr; }
.tiers li:first-child { border-top: 0; }
.tiers .de { font-family: var(--serif); color: var(--accent); }
.tiers span { font-size: .92rem; color: var(--ink-soft); }

.prose h2 { margin-top: 2.2rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: .45rem; }

footer {
  border-top: 1px solid var(--rule); padding: 1.6rem 0 2.4rem;
  font-size: .85rem; color: var(--muted);
}
.foot-inner { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: .9rem; }

@media (max-width: 34rem) {
  .tiers li { grid-template-columns: 1fr; }
}

/* Studio bar. Present on every page of every studio site, above the fold and
   before anything else, so the link back is never more than a glance away. It
   is a plain block rather than sticky on purpose: several of these pages are
   long and already carry their own headers, and a second fixed strip competing
   with those costs more than the link is worth. */
.studiobar {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: .76rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .45rem 1rem;
  background: var(--paper-sunk);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.studiobar b { color: var(--accent); font-weight: 600; letter-spacing: .03em; }
.studiobar:hover { color: var(--ink); }

/* ------------------------------------------------------------------
   Generated pages: /collocations/ and /nouns/
   Tokens are the ones already defined above, so these inherit the
   light/dark handling rather than restating any colour.
   ------------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.masthead-id { display: flex; align-items: baseline; gap: 0.7rem; min-width: 0; }
.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.tagline {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.masthead-nav { display: flex; gap: 1.1rem; font-size: 0.85rem; align-items: center; }
.nav-cta {
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper) !important;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
@media (max-width: 40rem) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .masthead-nav { flex-wrap: wrap; gap: 0.8rem; }
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.crumbs a { color: var(--muted); }

/* German text is the object of study here, so it gets its own face. */
.de { font-family: var(--serif); }
h1.de { font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.15; }

.tr-gloss { color: var(--muted); font-size: 0.95rem; margin-top: -0.4rem; }
.tr-gloss b { color: var(--ink-soft); font-weight: 600; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
  margin: 1.4rem 0;
  padding: 0.9rem 1rem;
  background: var(--paper-sunk);
  border-radius: 10px;
}
.meta div { display: flex; gap: 0.5rem; align-items: baseline; }
.meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta dd { margin: 0; font-weight: 500; }

.linklist { list-style: none; padding: 0; margin: 0.8rem 0; }
.linklist li { border-bottom: 1px solid var(--rule); }
.linklist li:last-child { border-bottom: 0; }
.linklist a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  align-items: baseline;
  padding: 0.55rem 0;
  text-decoration: none;
}
.linklist a:hover .de { color: var(--accent); }
.gloss { color: var(--muted); font-size: 0.9rem; }

.entrylist { list-style: none; padding: 0; margin: 1rem 0; }
.entrylist li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.entrylist li:last-child { border-bottom: 0; }
.entrylist .de { font-size: 1.05rem; }
.small { font-size: 0.85rem; }

.alpha { margin-top: 2rem; }
.alpha h2 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
}

/* ---- search ---- */
.site-search { position: relative; margin: 0; }
.site-search input {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  width: 15rem;
  max-width: 46vw;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-sunk);
  color: var(--ink);
}
.site-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.search-drop {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 40;
  width: min(28rem, 88vw);
  max-height: 24rem;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.18);
}

.search-page input {
  font: inherit;
  font-size: 1.1rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-sunk);
  color: var(--ink);
}
.search-page input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-status { color: var(--muted); font-size: 0.85rem; margin: 0.9rem 0; }

.sr {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.sr:last-child { border-bottom: 0; }
.sr:hover { background: var(--paper-sunk); }
.sr .de { font-size: 1rem; }
.sr-noun .de::after {
  content: "noun";
  margin-left: 0.5rem;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: middle;
}
.sr-none { padding: 0.8rem 0.9rem; margin: 0; color: var(--muted); font-size: 0.9rem; }
.sr-more {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  text-align: center;
  border-top: 1px solid var(--rule);
}

/* ---- search on the landing page ----
   The hero sits on --paper, so an input filled with --paper is invisible in
   dark mode: black on black with a near-black border. The block is a sunk
   panel and the field is inset within it, so the field is always a step away
   from whatever is behind it, in both themes. */
.home-search {
  margin: 2.2rem 0 0;
  padding: 1.05rem 1.15rem 1.15rem;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.home-search form { position: relative; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.home-search input {
  font: inherit;
  font-size: 1.05rem;
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.10);
}
.home-search input::placeholder { color: var(--muted); opacity: 1; }
.home-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.home-search .btn { flex: 0 0 auto; }
.home-search .search-drop { top: calc(100% + 0.45rem); left: 0; right: auto; }
.home-search-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Same trap in the masthead: give the field an edge that survives dark mode. */
.site-search input::placeholder { color: var(--muted); opacity: 1; }

/* ---- install CTA in the hero ----
   The install link used to appear only in the last slab and the footer, so a
   visitor saw no way to get the app without scrolling the whole page. It is
   the point of the site, so it goes above the fold. */
.hero-cta { margin: 2rem 0 0; }
.btn-play {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  padding: 0.6rem 1.6rem 0.68rem;
}
.btn-play-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.btn-play-main { font-size: 1.12rem; font-weight: 700; }
.hero-cta-note { margin: 0.7rem 0 0; font-size: 0.9rem; color: var(--muted); }

/* The search button must not compete with the install button next to it. */
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule);
  font-weight: 500;
}
.btn-quiet:hover { background: var(--paper-sunk); filter: none; }
