/* Public use-case pages (frontend/pages/*.html, built by tools/build_pages.py). Builds on landing.css. */
:root { --c4: #8b5cc7; }
@media (prefers-color-scheme: dark) { :root { --c4: #b994f5; } }

.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 4px; }
.use-hero { padding-top: 36px; }
.use-hero h1 { font-size: clamp(34px, 4.4vw, 54px); }
.use-hero h1 em { display: block; font-size: .7em; line-height: 1.15; margin-top: .25em; }
.use-hero .lede i { font-family: var(--serif); }

/* ---------- scenes: shared ---------- */
.scene { overflow: hidden; }
.scene-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.scene-sentence { font: 400 clamp(19px, 1.7vw, 23px)/2.6 var(--serif); margin: 0 0 6px; position: relative; }
.scene .w { position: relative; border-radius: 4px; padding: 1px 2px; transition: background .5s, box-shadow .5s; }
.w.c1 { --wc: var(--c1); } .w.c2 { --wc: var(--c2); } .w.c3 { --wc: var(--c3); } .w.c4 { --wc: var(--c4); } .w.verb { --wc: var(--accent); }
.scene-sentence .w.lit { background: color-mix(in srgb, var(--wc) 15%, transparent); box-shadow: inset 0 -3px 0 var(--wc); }
.tag { position: absolute; left: 0; bottom: 100%; margin-bottom: -1px; font: 600 10px/1 var(--sans); letter-spacing: .02em; text-transform: uppercase;
  white-space: nowrap; color: var(--wc); background: var(--paper); border: 1px solid color-mix(in srgb, var(--wc) 45%, transparent);
  border-radius: 999px; padding: 3px 6px; opacity: 0; transform: translateY(6px); transition: opacity .35s .15s, transform .35s .15s; pointer-events: none; }
.w.lit .tag { opacity: 1; transform: none; }
.w.lit.tag-off .tag { opacity: 0; }
@media (max-width: 700px) { .w.lit:not(.cur) .tag { opacity: 0; } }  /* phones: only the newest label, so they never overlap */
.br { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.br path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.br.on path { transition: stroke-dashoffset .9s ease-in-out; stroke-dashoffset: 0; }
.scene-note { font-size: 14.5px; line-height: 1.5; border-top: 1px dashed var(--rule); padding-top: 12px; margin-top: 4px;
  opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s; }
.scene-note.lit { opacity: 1; transform: none; }
.scene-note b { font-family: var(--serif); font-weight: 600; }

/* compound noun */
.compound { display: flex; align-items: baseline; flex-wrap: wrap; font: 500 23px/1.4 var(--serif); margin: 0 0 12px; opacity: 0; transition: opacity .4s; }
.compound.lit { opacity: 1; }
.compound .part { transition: margin .5s .35s, color .4s; border-radius: 4px; }
.compound.lit .part:not(.last) { margin-right: 14px; color: var(--muted); }
.compound .part.last { padding: 0 3px; transition: background .4s 1s, box-shadow .4s 1s; }
.compound.lit .part.last { background: color-mix(in srgb, var(--c1) 15%, transparent); box-shadow: inset 0 -3px 0 var(--c1); }
.compound .arrow, .compound .art { opacity: 0; transition: opacity .4s 1.5s; margin-left: 12px; }
.compound .art { color: var(--c1); font-weight: 600; margin-left: 8px; }
.compound.lit .arrow, .compound.lit .art { opacity: 1; }

/* ---------- news ---------- */
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.chip.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.deck { display: grid; }
.news-card { grid-area: 1 / 1; background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; margin: 0;
  transition: opacity .55s, transform .55s cubic-bezier(.2, .8, .2, 1); }
.news-card[data-step] { opacity: 0; transform: translateX(48px) rotate(2.5deg); }
.news-card.lit { opacity: 1; transform: none; }
.news-card .meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.news-card h3 { font: 500 20px/1.3 var(--serif); margin: 0 0 12px; }
.lines { display: grid; gap: 7px; margin: 0 0 12px; }
.lines i { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.lines i.short { width: 60%; }
.known { font-size: 12.5px; color: var(--muted); margin: 0; }
.known b { color: var(--c3); }
.surprise-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fake-btn { font: 500 13.5px/1 var(--sans); padding: 9px 13px; border-radius: 8px; background: var(--ink); color: var(--bg); }
.fake-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.fake-btn.lit { animation: press .55s ease-out; }
@keyframes press { 0% { transform: scale(1); } 35% { transform: scale(.92); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 12px transparent; } }

/* ---------- quiz ---------- */
.quiz { display: grid; }
.ex { grid-area: 1 / 1; position: relative; z-index: 1; background: var(--paper); transition: opacity .5s, transform .5s; }
.ex.lit { z-index: 2; }
.ex[data-step] { opacity: 0; transform: translateY(10px); }
.ex.lit { opacity: 1; transform: none; }
.ex .q { font: 400 clamp(20px, 2.1vw, 24px)/1.6 var(--serif); margin: 6px 0 14px; }
.hint { color: var(--muted); font-size: .8em; }
.blank { display: inline-block; min-width: 3.4em; border-bottom: 2px dashed var(--muted); text-align: center; line-height: 1.2; }
.fill { opacity: 0; color: var(--c3); font-weight: 600; transition: opacity .3s; }
.fill.lit { opacity: 1; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.opts span { font: 500 15px/1 var(--sans); padding: 9px 16px; border: 1px solid var(--rule); border-radius: 8px; transition: all .3s; }
.opts .right.lit { border-color: var(--c3); background: color-mix(in srgb, var(--c3) 14%, transparent); color: var(--c3); transform: scale(1.06); }
.why { font-size: 14.5px; line-height: 1.5; border-top: 1px dashed var(--rule); padding-top: 10px; margin: 0; opacity: 0; transition: opacity .4s .25s; }
.why.lit { opacity: 1; }
.why::before { content: "✓ "; color: var(--c3); font-weight: 700; }

/* ---------- flashcard ---------- */
.flip { display: grid; perspective: 1000px; margin: 8px 0 14px; }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--bg); border: 1px solid var(--rule);
  border-radius: 12px; padding: 22px 20px; min-height: 140px; display: flex; flex-direction: column; justify-content: center;
  transition: transform .8s cubic-bezier(.3, .1, .2, 1); }
.face p { margin: 0; }
.face .small { font-size: 13px; color: var(--muted); margin-top: 8px; }
.front p:first-child { font: 400 20px/1.5 var(--serif); }
.front mark { background: var(--link-bg); color: inherit; border-radius: 3px; padding: 0 3px; }
.back { transform: rotateY(180deg); text-align: center; }
.back .word { font: 500 24px/1.3 var(--serif); }
.back .word .art.c1 { color: var(--c1); } .back .word .art.c2 { color: var(--c2); }
.back .mean { font-weight: 600; margin-top: 4px; }
.flip.lit .front { transform: rotateY(-180deg); }
.flip.lit .back { transform: rotateY(0); }
.scene-flash .mock-rate { margin-top: 0; }
.scene-flash .mock-rate span { transition: all .3s; }
.scene-flash .mock-rate .good { border-color: var(--rule); color: var(--muted); font-weight: 400; }
.scene-flash .mock-rate .good.lit { border-color: var(--c3); color: var(--c3); background: color-mix(in srgb, var(--c3) 14%, transparent); font-weight: 600; }
.timeline { display: flex; justify-content: space-between; margin-top: 18px; position: relative; font-size: 11.5px; color: var(--muted); }
.timeline::before { content: ""; position: absolute; left: 6px; right: 6px; top: 5px; height: 2px; background: var(--rule); }
.timeline span { position: relative; padding-top: 18px; text-align: center; transition: color .3s; }
.timeline span::before { content: ""; position: absolute; top: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--rule); transition: all .3s; }
.timeline span:first-child::before { left: 6px; } .timeline span:last-child::before { left: auto; right: 0; margin: 0; }
.timeline span:first-child { text-align: left; } .timeline span:last-child { text-align: right; }
.timeline span.lit { color: var(--ink); }
.timeline span.lit::before { background: var(--c3); border-color: var(--c3); transform: scale(1.15); }

/* ---------- browser ---------- */
.bw { position: relative; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--bg); }
.bw-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--ink) 4%, var(--bg)); }
.bw-bar > i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.url { flex: 1; min-width: 0; margin-left: 8px; font-size: 12px; color: var(--muted); background: var(--paper); border-radius: 6px; padding: 4px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext { position: relative; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--ink); color: var(--bg); font: 700 13px/1 var(--sans); }
.ext b { border-bottom: 2px solid var(--accent); line-height: 1; }
.ext.lit::after { content: ""; position: absolute; inset: -4px; border-radius: 9px; border: 2px solid var(--accent); animation: ring .8s ease-out forwards; }
@keyframes ring { from { opacity: 1; transform: scale(.8); } to { opacity: 0; transform: scale(1.6); } }
.bw-body { display: grid; min-height: 250px; }
.site, .reader { grid-area: 1 / 1; padding: 18px 20px; }
.site .kicker { font: 700 10.5px/1 var(--sans); letter-spacing: .12em; color: var(--c2); margin-bottom: 8px; }
.site .h { font: 700 19px/1.25 var(--sans); margin-bottom: 14px; }
.site .ad { margin: 14px 0 0; height: 46px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; color: var(--muted);
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 5%, transparent) 0 8px, transparent 8px 16px); }
.reader { background: var(--paper); opacity: 0; transform: scale(.97); transition: opacity .6s, transform .6s; }
.reader.lit { opacity: 1; transform: none; }
.reader .h { font: 500 20px/1.3 var(--serif); margin-bottom: 10px; }
.reader .txt { font: 400 17px/1.7 var(--serif); margin: 0; }
.reader .w.lit { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.pop { margin-top: 12px; max-width: 250px; font-size: 13.5px; line-height: 1.5; background: var(--bg); border: 1px solid var(--rule); border-radius: 8px;
  padding: 10px 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-6px); transition: opacity .4s .2s, transform .4s .2s; }
.pop.lit { opacity: 1; transform: none; }
.pop b { font-family: var(--serif); font-size: 16px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.cursor { position: absolute; left: 55%; top: 72%; width: 18px; height: 22px; z-index: 3; background: var(--ink);
  clip-path: polygon(0 0, 0 78%, 26% 60%, 42% 100%, 58% 93%, 42% 55%, 76% 55%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3));
  transition: left 1s cubic-bezier(.4, .1, .2, 1), top 1s cubic-bezier(.4, .1, .2, 1), opacity .4s; }
.cursor.lit { left: calc(100% - 20px); top: 24px; }

/* ---------- page sections ---------- */
.usec h2 { margin-bottom: 8px; }
.wide { font-size: 17px; line-height: 1.65; max-width: 780px; color: color-mix(in srgb, var(--ink) 84%, var(--muted)); }
.wide i, .feat i { font-family: var(--serif); }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px 36px; margin-top: 30px; }
.feat { border-top: 2px solid var(--ink); padding-top: 14px; }
.feat p { color: var(--muted); font-size: 15.5px; margin: 0; }
.how3 { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.how3 li { border-top: 1px solid var(--rule); padding-top: 18px; }
.how3 .num { display: block; font-size: 30px; margin-bottom: 10px; }
.how3 p { color: var(--muted); font-size: 15.5px; margin: 0; }
.ucards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 26px; }
.ucard { position: relative; display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  padding: 16px 40px 16px 18px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.ucard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, var(--rule)); }
.ucard h3 { font-size: 15.5px; }
.ucard p { color: var(--muted); font-size: 14px; margin: 0; }
.ucard .go { position: absolute; right: 16px; top: 16px; color: var(--accent-ink); transition: transform .2s; }
.ucard:hover .go { transform: translateX(3px); }
.beta a:not(.btn) { color: inherit; }
.foot-uses { flex-basis: 100%; font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.9; }
.foot-uses a { color: var(--muted); }

/* reveal on scroll (added by uses.js, so the page is complete without JavaScript) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 960px) { .how3 { grid-template-columns: 1fr; gap: 18px; } }
@media (max-width: 600px) {
  .crumbs { padding-top: 16px; }
  .use-hero { padding-top: 20px; }
  .scene-sentence { line-height: 2.7; }
  .bw-body { min-height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .scene *, .scene { transition: none !important; animation: none !important; }
}

/* landing page: the guides section */
.uses-text { color: var(--muted); font-size: 15.5px; }
.uses .ucards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.uses .ucard h3 { margin: 0; }

/* EN · DE · FR switch in the guide pages' top bar */
.lang-switch { display: flex; gap: 2px; font: 600 12px/1 var(--sans); letter-spacing: .04em; }
.lang-switch a { text-decoration: none; color: var(--muted); padding: 6px 7px; border-radius: 6px; }
.lang-switch a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lang-switch a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
@media (max-width: 600px) { .lang-switch { margin-right: -4px; } }
