/* Lingfold — one stylesheet for the home page and the app pages. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter-tight-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter-tight-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  /* Colours from the logo (public/brand): navy #1b2b3f, teal #13897f, cool white #f5f7f8.
     --green and --coral keep their old names: --green is the navy band, --coral the teal accent. */
  --bg: #f8fafb;
  --surface: #ffffff;
  --sand: #eef2f4;
  --text: #1b2b3f;
  --muted: #5a6575;
  --line: #dfe5ea;
  --strong: #1b2b3f;
  --on-strong: #f8fafb;
  --green: #1b2b3f;
  --green-deep: #13202f;
  --on-green: #f5f7f8;
  --coral: #13897f;
  --link: #0f766c;
  --warn-bg: #fdf0dc;
  --warn: #7a4a00;
  --ok-bg: #e2f3f1;
  --ok: #0f5f57;
  --danger: #a3341f;
  --mark: #eef2f4;
  --display:
    'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1722;
    --surface: #16202d;
    --sand: #1b2635;
    --text: #f5f7f8;
    --muted: #a3adb9;
    --line: #283445;
    --strong: #f5f7f8;
    --on-strong: #1b2b3f;
    --green: #182a40;
    --green-deep: #0f1c2c;
    --on-green: #f5f7f8;
    --coral: #3cc2b4;
    --link: #5fd0c3;
    --warn-bg: #36280f;
    --warn: #f0c27a;
    --ok-bg: #10302d;
    --ok: #7fd9cd;
    --danger: #f19a8a;
    --mark: #1f2a38;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1722;
  --surface: #16202d;
  --sand: #1b2635;
  --text: #f5f7f8;
  --muted: #a3adb9;
  --line: #283445;
  --strong: #f5f7f8;
  --on-strong: #1b2b3f;
  --green: #182a40;
  --green-deep: #0f1c2c;
  --on-green: #f5f7f8;
  --coral: #3cc2b4;
  --link: #5fd0c3;
  --warn-bg: #36280f;
  --warn: #f0c27a;
  --ok-bg: #10302d;
  --ok: #7fd9cd;
  --danger: #f19a8a;
  --mark: #1f2a38;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
}
a {
  color: var(--link);
  text-underline-offset: 0.18em;
}
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* Top bar, shared by every page. */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.1rem 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  /* The wordmark is lowercase, like the logo in public/brand. */
  text-transform: lowercase;
}
.brand svg {
  width: 28px;
  height: 28px;
  flex: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.95rem;
}
.nav a:not(.button) {
  color: var(--text);
  text-decoration: none;
}
.nav a:not(.button):hover {
  color: var(--muted);
}
.who {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  min-width: 0;
}
.who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons: pills, solid or outlined. */
button,
.button {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.45rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}
button:hover,
.button:hover {
  border-color: var(--muted);
}
button.primary,
.button.primary {
  background: var(--strong);
  border-color: var(--strong);
  color: var(--on-strong);
}
button.primary:hover,
.button.primary:hover {
  opacity: 0.86;
}
.button.large {
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
}
button.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--link);
  text-decoration: underline;
  font-size: inherit;
  font-weight: inherit;
  border-radius: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* App pages. */
main.app {
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.5rem 16px 5rem;
}
main.app h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 1rem 0 0.4rem;
  letter-spacing: -0.03em;
}
main.app h2 {
  font-size: 1.3rem;
  margin: 2.6rem 0 0.8rem;
}
main.app h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.5rem;
}
p {
  margin: 0.5rem 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  margin: 0.8rem 0;
}
.banner {
  border-radius: 14px;
  padding: 0.95rem 1.2rem;
  margin: 1rem 0;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.banner.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.banner.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.12rem 0.6rem;
  border-radius: 99px;
  background: var(--mark);
  color: var(--muted);
  vertical-align: middle;
}
.pill.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.pill.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill.bad {
  background: var(--warn-bg);
  color: var(--danger);
  font-weight: 600;
}
.alerts {
  margin: 0;
  padding-left: 1.1rem;
}
.bar {
  height: 8px;
  border-radius: 4px;
  background: var(--sand);
  overflow: hidden;
  margin: 0.4rem 0;
}
.bar span {
  display: block;
  height: 100%;
  background: var(--green);
}
input[type='email'],
input[type='text'],
input[type='password'],
input[type='file'],
select,
textarea {
  font: inherit;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
select {
  width: auto;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--strong);
}
textarea {
  min-height: 5.5rem;
  resize: vertical;
}
label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0.9rem 0 0.35rem;
}
label.check {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-weight: 400;
  margin: 0 0.8rem 0 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.files {
  width: 100%;
  border-collapse: collapse;
}
.files td {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.files tr:last-child td {
  border-bottom: 0;
}
.files td:last-child {
  text-align: right;
  white-space: nowrap;
  padding-left: 1rem;
}
.type .price {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.6rem;
  color: var(--text);
}
.type .price span {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}
/* Review panel, note groups and folded notes on the project page (ADR-049). */
.review-panel .rp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
[hidden] {
  display: none !important;
}
.card.review-panel .rp-head h2,
.card.review-panel > h2 {
  margin: 0;
}
.card.review-panel .rp-head {
  margin: 0 0 0.6rem;
}
.review-panel .actions {
  margin-top: 0.8rem;
}
.count {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--sand);
  font-size: 0.8em;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
}
details.fyi {
  margin-top: 2rem;
}
details.fyi > summary {
  cursor: pointer;
  list-style: none;
}
details.fyi > summary::-webkit-details-marker {
  display: none;
}
details.fyi > summary h2 {
  display: inline-block;
  margin: 0 0 0.3rem;
}
details.fyi > summary h2::before {
  content: '▸ ';
  color: var(--muted);
}
details.fyi[open] > summary h2::before {
  content: '▾ ';
}
details.fyi > summary > span {
  display: block;
  margin-bottom: 1rem;
}
.card.note > p:first-of-type {
  margin-top: 0;
}
details.note-done {
  margin: 0.4rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #fff);
}
details.note-done > summary {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.92rem;
  list-style: none;
}
details.note-done > summary::-webkit-details-marker {
  display: none;
}
details.note-done > summary > span:first-of-type + span {
  white-space: nowrap;
}
details.note-done > summary .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
details.note-done .tick {
  color: var(--green);
  font-weight: 700;
}
details.note-done[open] > .note {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}
details.pro {
  margin-top: 0.8rem;
}
details.pro > summary {
  cursor: pointer;
  color: var(--muted);
}
#flash {
  margin-bottom: 1.2rem;
}
/* Live progress on the project page. */
.progress .steps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-bottom: 1rem;
}
.step-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.step-row .dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
}
.step-row.done {
  color: var(--text);
}
.step-row.done .dot {
  background: var(--green);
  border-color: var(--green);
}
.step-row.active {
  color: var(--text);
  font-weight: 600;
}
.step-row.active .dot {
  border-color: var(--coral);
  background: var(--coral);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .step-row.active .dot {
    animation: none;
  }
}
.lang-progress {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.lp-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  align-items: center;
  gap: 0.8rem;
}
.lp-row .bar {
  margin: 0;
}
@media (max-width: 520px) {
  .lp-row {
    grid-template-columns: 1fr auto;
  }
  .lp-row .bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
/* Workflow on the project page (ADR-055): a row per language, stages joined by a line. */
.flow {
  display: grid;
  gap: 1.1rem;
}
.flow-row {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 0.4rem 1.2rem;
  align-items: start;
}
.flow-row + .flow-row {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.flow-lang {
  display: grid;
  gap: 0.15rem;
}
.flow-warn {
  color: var(--warn);
}
.flow-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.fs {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.15rem;
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 0;
}
/* The line to the next stage, drawn behind the dots. */
.fs:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0.55rem;
  left: calc(50% + 0.75rem);
  right: calc(-50% + 0.75rem);
  height: 2px;
  background: var(--line);
}
.fs.done:not(:last-child)::after,
.fs.skipped:not(:last-child)::after {
  background: var(--green);
}
.fs-dot {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 600;
}
.fs-label {
  color: var(--text);
}
.fs-detail {
  overflow-wrap: anywhere;
}
.fs.done .fs-dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
}
.fs.active .fs-dot {
  border-color: var(--coral);
  background: var(--coral);
  animation: pulse 1.4s ease-in-out infinite;
}
.fs.active .fs-label,
.fs.active .fs-detail {
  color: var(--text);
  font-weight: 600;
}
.fs.skipped .fs-dot {
  border-style: dashed;
  color: var(--muted);
}
.fs.waiting .fs-label {
  color: var(--muted);
}
.fs.failed .fs-dot {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--surface);
}
@media (prefers-reduced-motion: reduce) {
  .fs.active .fs-dot {
    animation: none;
  }
}
@media (max-width: 560px) {
  .flow-row {
    grid-template-columns: 1fr;
  }
  .fs {
    font-size: 0.72rem;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Language headings with an "Approve all" button on the right. */
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
button.small-button {
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  font-weight: 500;
}
/* "What changed in review" on the project page. */
.card.review-summary > h3 {
  margin: 0 0 0.2rem;
}
.card.review-summary h4 {
  margin: 1.2rem 0 0.5rem;
  font-size: 0.95rem;
}
.review-summary .change + .change {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.review-summary .change > p:first-child {
  margin-top: 0;
}
.review-summary .before {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent);
}
.review-summary .before .label {
  text-decoration: none;
  display: inline-block;
}
.review-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}
/* Plan comparison on /settings: scrolls sideways on phones rather than squeezing. */
.plans {
  display: block;
  overflow-x: auto;
  font-size: 0.9rem;
}
.plans th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding: 0 1rem 0.5rem 0;
  white-space: nowrap;
}
.plans td,
.plans td:last-child {
  text-align: left;
  padding-right: 1rem;
  padding-left: 0;
  white-space: nowrap;
}
.plans tr.current td {
  font-weight: 600;
}
.passage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.passage div {
  background: var(--bg);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.passage .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
@media (max-width: 560px) {
  .passage {
    grid-template-columns: 1fr;
  }
}
.outcome {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--ok);
}
.msg {
  margin-top: 0.6rem;
  font-size: 0.875rem;
}
.msg.err {
  color: var(--danger);
}
.editor {
  display: none;
  margin-top: 0.75rem;
}
.editing .editor {
  display: block;
}
.editing .view-actions {
  display: none;
}
ul.learned {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}
.mail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}
.narrow {
  max-width: 27rem;
  margin: 3rem auto;
}
details summary {
  cursor: pointer;
}

/* Home page. */
.home main {
  overflow-x: clip;
}
.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
  padding: 4.5rem 0 5rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 1.4rem;
}
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 2rem;
}
.lede a {
  color: var(--text);
  font-weight: 500;
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}
.fine {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1rem;
}
.thread {
  display: grid;
  gap: 0.9rem;
}
.mailcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.25rem 1.2rem;
  font-size: 0.93rem;
}
.mailcard.reply {
  margin-left: 2.2rem;
  background: var(--sand);
  border-color: transparent;
}
.mailmeta {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  row-gap: 0.1rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.mailmeta b {
  font-weight: 500;
  color: var(--text);
}
.mailcard p {
  margin: 0 0 0.5rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
}
.chip i {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  color: #fff;
}
.t-docx {
  background: #2b5797;
}
.t-pptx {
  background: #c4502f;
}
.t-xlsx {
  background: #1f7244;
}
.t-pdf {
  background: #b3261e;
}

.section {
  padding: 5.5rem 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.8rem;
}
.section h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
}
.section-head p {
  color: var(--muted);
  margin: 0;
  max-width: 30rem;
}
.types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.type {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.type .badge {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.type h3 {
  margin: 0;
  font-size: 1.25rem;
}
.type .ext {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.95rem;
}
.type p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.type .limit {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}
.note {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem;
  counter-reset: step;
}
.step {
  border-top: 1px solid var(--text);
  padding-top: 1.1rem;
}
.step .n {
  font-family: var(--display);
  font-size: 0.9rem;
  color: var(--muted);
}
.step h3 {
  font-size: 1.35rem;
  margin: 0.5rem 0 0.5rem;
}
.step p {
  margin: 0;
  color: var(--muted);
}

.band {
  background: var(--green);
  color: var(--on-green);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.band h2 {
  color: var(--on-green);
}
.band p {
  color: color-mix(in srgb, var(--on-green) 78%, transparent);
  font-size: 1.05rem;
}
.band .button.primary {
  background: var(--on-green);
  border-color: var(--on-green);
  color: #1b2b3f;
}
.memory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.memory li {
  background: var(--green-deep);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.memory li span:last-child {
  color: color-mix(in srgb, var(--on-green) 65%, transparent);
  white-space: nowrap;
}

.foot {
  border-top: 1px solid var(--line);
  margin-top: 5.5rem;
}
.foot .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.foot a {
  color: var(--muted);
  text-decoration: none;
}
.foot .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}
.foot a:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .hero,
  .band,
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding: 2.5rem 0 3.5rem;
    gap: 2.5rem;
  }
  .types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }
}
@media (max-width: 560px) {
  .types {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav .hide-sm {
    display: none;
  }
  .mailcard.reply {
    margin-left: 1rem;
  }
  .section {
    padding: 3.8rem 0;
  }
}

/* App pages use a narrower column; the top bar lines up with it. */
body:not(.home) .top {
  max-width: 54rem;
  flex-wrap: wrap;
}
.appnav {
  display: flex;
  gap: 1.2rem;
  margin-right: auto;
  margin-left: 1rem;
  font-size: 0.95rem;
}
.appnav a {
  color: var(--text);
  text-decoration: none;
}
.appnav a:hover {
  color: var(--muted);
}
@media (max-width: 640px) {
  .appnav {
    order: 3;
    width: 100%;
    margin: 0.2rem 0 0;
    overflow-x: auto;
  }
}
.band h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

/* One way to finish a review (ADR-065): Change this, a ••• menu for rules, and a bar at the bottom. */
.card.note.flag {
  border-left: 3px solid var(--coral);
}
.view-actions {
  position: relative;
  justify-content: flex-end;
}
details.more {
  position: relative;
}
details.more > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
details.more > summary::-webkit-details-marker {
  display: none;
}
details.more > summary:hover,
details.more[open] > summary {
  color: var(--text);
  background: var(--sand);
}
details.more .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  min-width: 15rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(23, 23, 28, 0.12);
}
details.more .menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: none;
  padding: 0.5rem 0.65rem;
}
details.more .menu button:hover {
  background: var(--sand);
}
details.more .menu small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}
main.app:has(.finish) {
  padding-bottom: 10rem;
}
.finish {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(23, 23, 28, 0.08);
  padding: 0.85rem 16px calc(0.85rem + env(safe-area-inset-bottom, 0px));
}
.finish .finish-row,
.finish .confirm {
  max-width: 54rem;
  margin: 0 auto;
}
.finish .finish-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
}
.finish .finish-row > span {
  color: var(--muted);
  min-width: 0;
  flex: 1 1 16rem;
}
.finish .finish-row strong {
  color: var(--text);
}
.finish .confirm {
  background: var(--sand);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
}
.finish .confirm ul {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.2rem;
}
.finish .confirm .actions {
  justify-content: flex-end;
}

/* Terms, Privacy, Data deletion and Contact pages. */
.legal {
  max-width: 44rem;
  padding: 3.5rem 0 1rem;
}
.legal h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  letter-spacing: -0.035em;
  margin: 0 0 0.5rem;
}
.legal .updated {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 1.5rem;
}
.legal .lede {
  font-size: 1.15rem;
  margin-bottom: 2rem;
}
.legal h2 {
  font-size: 1.2rem;
  margin: 2.2rem 0 0.6rem;
}
.legal p,
.legal li {
  line-height: 1.65;
}
.legal ul {
  padding-left: 1.2rem;
}
.legal li {
  margin-bottom: 0.4rem;
}
.legal table.plain {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  max-width: 28rem;
}
.legal table.plain th,
.legal table.plain td {
  text-align: left;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.versus {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.versus-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.6rem 1.5rem;
}
.versus-col h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.versus-col.lingfold {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
  display: flex;
  flex-direction: column;
}
.versus-col.lingfold h3 {
  color: var(--on-green);
}
.versus-col.lingfold p {
  margin: auto 0 0;
  color: color-mix(in srgb, var(--on-green) 78%, transparent);
}
.chat-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.55rem;
}
.chat-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  align-items: baseline;
  color: var(--muted);
}
.chat-steps li::before {
  content: counter(step);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.chat-steps.one {
  margin-bottom: 1.5rem;
}
.chat-steps.one li {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--on-green);
  grid-template-columns: 2.4rem 1fr;
}
.chat-steps.one li::before {
  font-size: 1rem;
  color: #3cc2b4;
}
@media (max-width: 900px) {
  .versus {
    grid-template-columns: 1fr;
  }
  .versus-col.lingfold p {
    margin-top: 0;
  }
}
.secure {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.secure li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem 1.3rem 1.5rem;
}
.secure h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.secure p {
  margin: 0;
  color: var(--muted);
}
.secure-more {
  margin-top: 1.25rem;
}
@media (max-width: 1100px) {
  .secure {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .secure {
    grid-template-columns: 1fr;
  }
}
.legal table.plain.wide {
  max-width: none;
}
@media (max-width: 600px) {
  .legal table.plain.wide {
    font-size: 0.9rem;
  }
}
.contact-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}
.contact-grid .card h2 {
  margin-top: 0;
}
.contact-grid a {
  word-break: break-word;
}

/* Real output samples on the homepage */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 1.2rem; }
.compare figure { margin: 0; }
.compare img { width: 100%; height: auto; border: 1px solid var(--line, #ddd); border-radius: 8px; background: #fff; display: block; }
.compare figcaption { font-size: 13px; color: var(--muted, #666); margin-top: 6px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 1rem; }
.tabs button { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line, #ccc); background: transparent; color: inherit; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }
.pair { display: none; } .pair.on { display: block; }
.trust { font-size: 14px; color: var(--muted, #666); margin-top: .6rem; }
.notes-card { margin-top: 16px; border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 16px 18px; }
.notes-card h3 { margin-top: 0; }
.notes-card ul { padding-left: 18px; font-size: 14px; }
.report-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.report-thumb img { width: 100%; border: 1px solid var(--line, #ddd); border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
@media (max-width: 640px) { .report-card { grid-template-columns: 1fr; } .report-thumb { max-width: 200px; } }
.notes-card .dl { font-size: 14px; margin-bottom: 0; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.band + .section {
  margin-top: 5.5rem;
}
.lede-strong {
  font-size: 1.15rem;
  font-weight: 600;
  max-width: 34rem;
  margin: -1rem 0 2rem;
}
/* Word for word vs Lingfold, in the learning band */
.wfw {
  margin: 0;
}
.wfw table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.45rem;
  font-size: 0.95rem;
}
.wfw caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.wfw th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: color-mix(in srgb, var(--on-green) 70%, transparent);
  padding: 0 1rem;
}
.wfw td {
  background: var(--green-deep);
  padding: 0.75rem 1rem;
  width: 50%;
}
.wfw td:first-child {
  border-radius: 14px 0 0 14px;
  color: color-mix(in srgb, var(--on-green) 60%, transparent);
}
.wfw td:last-child {
  border-radius: 0 14px 14px 0;
  font-weight: 600;
}
.wfw s {
  text-decoration-color: #e8907a;
  text-decoration-thickness: 2px;
}
.wfw figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--on-green) 65%, transparent);
}
.learns {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 1.6rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--on-green) 20%, transparent);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  counter-reset: learn;
}
.learns li {
  counter-increment: learn;
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
}
.learns b::before {
  content: counter(learn) ". ";
  opacity: 0.6;
}
.learns span {
  color: color-mix(in srgb, var(--on-green) 78%, transparent);
}
@media (max-width: 900px) {
  .learns {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.wfw th:last-child {
  color: #3cc2b4;
}
