@font-face { font-family: "Transcription IPA"; src: url("/fonts/ipa.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
/* Layout: one narrow phone column. Wine header band with the small logo in its right corner, website panel, search, then word cards: a UK block (phonemic and phonetic) and a US block (phonemic), each with its own play button. */
:root {
  --bg: #FDFBFB;
  --surface: #FFFFFF;
  --ink: #2A1119;
  --muted: #7A5C66;
  --line: #EBDCE1;
  --tint: #F7EAEE;
  --head-bg: #6D1A36;
  --head-ink: #FFFFFF;
  --btn: #6D1A36;
  --btn-ink: #FFFFFF;
  --btn-active: #A82B55;
  --focus: #A82B55;
  --font-display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ipa: "Transcription IPA", "Gentium Plus", "Charis SIL", "DejaVu Serif", "Noto Serif", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B0A11;
    --surface: #2A111B;
    --ink: #F8EEF1;
    --muted: #C9A8B3;
    --line: #432032;
    --tint: #3A1727;
    --head-bg: #4A0F24;
    --head-ink: #FFFFFF;
    --btn: #A82B55;
    --btn-ink: #FFFFFF;
    --btn-active: #D14A78;
    --focus: #F08CAD;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1B0A11;
  --surface: #2A111B;
  --ink: #F8EEF1;
  --muted: #C9A8B3;
  --line: #432032;
  --tint: #3A1727;
  --head-bg: #4A0F24;
  --head-ink: #FFFFFF;
  --btn: #A82B55;
  --btn-ink: #FFFFFF;
  --btn-active: #D14A78;
  --focus: #F08CAD;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
.topbar { background: var(--head-bg); color: var(--head-ink); padding: 10px 16px; }
.topbar-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { min-width: 0; }
.topbar h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
.topbar .by { display: block; margin-top: 3px; font-size: 14px; letter-spacing: 0.02em; opacity: 0.92; }
.topbar .by b { font-weight: 600; }
.logo {
  flex: none;
  width: 52px;
  height: 52px;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 3px;
}
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 16px; }

.site {
  background: var(--head-bg);
  color: var(--head-ink);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site p { margin: 0; font-size: 15px; line-height: 1.45; }
.site a {
  align-self: flex-start;
  color: var(--head-ink);
  font-weight: 600;
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.site a:focus-visible, .play:focus-visible, .search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.search { display: flex; flex-direction: column; gap: 6px; }
.search label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.search input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.count { font-size: 13px; color: var(--muted); margin: 0; }
.key { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 6px 0 0; font-family: var(--font-ipa); }
.key b { color: var(--text, inherit); font-weight: 600; }
.key .kh { font-weight: 700; }

.list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.word {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.word h2 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.2; }
.block { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.block + .block { border-top: 1px solid var(--line); padding-top: 12px; }
.form + .form .block:first-of-type { padding-top: 0; }
.lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tag { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.line { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cap { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.forms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.or { font-size: 13px; color: var(--muted); }
.ipa {
  max-width: 100%;
  font-family: var(--font-ipa);
  font-size: 21px;
  line-height: 1.35;
  background: var(--tint);
  border-radius: 8px;
  padding: 3px 10px;
  overflow-wrap: anywhere;
}
.play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--btn);
  color: var(--btn-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play[aria-pressed="true"] { background: var(--btn-active); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; margin: 0; }
.note { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.whead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form + .form { border-top: 1px dashed var(--line); padding-top: 12px; }
.formlabel { font-size: 13px; font-weight: 600; color: var(--btn); }
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--head-bg);
  color: var(--head-ink);
  font-size: 14px;
  line-height: 1.4;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
@media (prefers-reduced-motion: no-preference) {
  .play { transition: background-color 0.15s; }
}

.wod { border: 1.5px solid var(--btn); border-radius: 16px; padding: 12px 12px 14px; background: var(--tint); display: flex; flex-direction: column; gap: 8px; }
.wod[hidden] { display: none; }
.wodlabel { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--btn); }
.woddate { margin: 0; font-size: 13px; color: var(--muted); }
.wodlist { margin: 0; padding: 0; }
.wodalert[hidden], .wodalert .install[hidden] { display: none; }
.wodalert { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wodalert .install:disabled { opacity: 0.6; cursor: default; }
.more { align-self: center; font: inherit; font-weight: 600; color: var(--btn); background: transparent; border: 1.5px solid var(--btn); border-radius: 999px; padding: 10px 22px; cursor: pointer; }
.more:focus-visible, .install:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.install { align-self: flex-start; font: inherit; font-weight: 600; color: var(--head-bg); background: var(--head-ink); border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.sugg { color: var(--muted); font-size: 14px; margin: 0; }
.status { font-size: 12px; color: var(--muted); margin: 0; }
.intro { display: flex; flex-direction: column; gap: 8px; }
.intro .status { font-size: 14px; font-weight: 600; color: var(--btn); }
.site { margin-top: 8px; }
.introrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.themebtn { font: inherit; font-size: 13px; font-weight: 600; color: var(--btn); background: transparent; border: 1.5px solid var(--btn); border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.themebtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.suggbox { margin-top: 10px; }
.suggrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.suggrow button { font: inherit; font-size: 16px; font-weight: 600; color: var(--btn); background: var(--surface); border: 1.5px solid var(--btn); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.suggrow button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.use { font-size: 14px; color: var(--muted); margin: 2px 0 6px; line-height: 1.4; }
.cap.eg { text-transform: none; letter-spacing: 0; font-size: 13px; font-style: italic; }
.stemnote { margin: 0 0 10px; padding: 10px 14px; background: var(--tint); border-radius: 12px; font-size: 15px; }
.infl { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.infl summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--btn); }
.infl summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ending { margin-top: 10px; }
.endhead { font-size: 15px; font-weight: 600; }
.endrule { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.ipa.ex { display: block; white-space: nowrap; font-size: 14px; max-width: 100%; overflow-x: auto; }
.forms { max-width: 100%; }
.browse { margin: 0; font-size: 15px; }
.browse a { color: var(--btn); font-weight: 600; }

.page-brand { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0; }
.crumbs a, .rel a, .letters a, .wordlist a { color: var(--btn); font-weight: 600; text-decoration: none; }
.crumbs a:hover, .rel a:hover, .letters a:hover, .wordlist a:hover { text-decoration: underline; }
.page-h1 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; margin: 0; }
.explain { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.6; }
.explain p { margin: 0; }
.explain .ipa { font-size: 17px; padding: 1px 6px; white-space: nowrap; }
.explain h2, .rel h2 { font-family: var(--font-display); font-size: 21px; margin: 6px 0 0; }
.cta { display: inline-block; align-self: flex-start; font-weight: 600; color: var(--btn-ink); background: var(--btn); border-radius: 999px; padding: 11px 22px; text-decoration: none; }
.cta:focus-visible, .rel a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rel ul, .wordlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rel li a, .wordlist li a { display: inline-block; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; }
.letters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.letters a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; box-sizing: border-box; border: 1.5px solid var(--btn); border-radius: 10px; font-size: 18px; }
.topbar a { color: inherit; text-decoration: none; }
.study { display: flex; flex-direction: column; gap: 12px; }
.study h2, .faq h2, .guide h2 { font-family: var(--font-display); font-size: 21px; margin: 6px 0 0; }
.sylbox { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.sylbox h3 { margin: 0 0 8px; font-size: 16px; }
.sylbox p { margin: 8px 0 0; line-height: 1.55; }
.syls { display: flex; flex-wrap: wrap; gap: 6px; }
.syl { font-size: 20px; padding: 4px 12px; border-radius: 10px; border: 1.5px solid var(--line); }
.syl.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); font-weight: 700; }
.study .ending { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.study .endhead { font-weight: 700; font-size: 17px; }
.study .endrule { color: var(--muted); font-size: 14px; line-height: 1.5; }
.study .ending .line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.study .ending .cap { font-size: 12px; font-weight: 700; letter-spacing: .08em; min-width: 26px; }
.pat { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }
.faq details { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; margin-top: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; line-height: 1.55; }
.guides-nav { margin-top: 4px; }
.guides-nav a { width: auto; padding: 0 14px; font-size: 15px; }
.guides-nav a[aria-current] { background: var(--btn); color: var(--btn-ink); }
.guides-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding: 8px 0; }
.guides-foot a { color: var(--btn); font-weight: 600; text-decoration: none; }
.tablewrap { overflow-x: auto; }
.gtable { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.gtable th, .gtable td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.gtable thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gtable tr.grp th { background: var(--surface); font-family: var(--font-display); font-size: 17px; }
.gtable .sym .ipa { font-size: 20px; }
.gtable a { color: var(--btn); font-weight: 600; text-decoration: none; }
.gtable .ex .ipa { font-size: 14px; margin-left: 4px; }
.gform { display: inline-block; margin: 2px 0; }
.gnote { color: var(--muted); font-size: 13px; }
.gcards { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.gcards a { display: flex; flex-direction: column; gap: 6px; height: 100%; box-sizing: border-box; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 16px; text-decoration: none; color: inherit; }
.gcards a:hover { border-color: var(--btn); }
.gcards b { color: var(--btn); font-size: 18px; }
