@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;650;700&family=STIX+Two+Text:wght@500;600&display=swap");

:root {
  color-scheme: light dark;
  --navy: #193653;
  --ivory: #f6f0e3;
  --gold: #e3c488;
  --paper: #f8f6f0;
  --surface: #fffdf7;
  --panel: #eaf1f3;
  --ink: #172c44;
  --muted: #4e606c;
  --line: #cad7dc;
  --action: #193653;
  --action-text: #f6f0e3;
  --focus: #2c6487;
  --playback-surface: #e8e4da;
  --display: "STIX Two Text", Georgia, serif;
  --gutter: clamp(14px, 4vw, 48px);
  font:
    16px/1.5 "DM Sans",
    system-ui,
    sans-serif;
  background: var(--paper);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #192028;
    --surface: #222a34;
    --panel: #202d39;
    --ink: #f6f0e3;
    --muted: #bbc5d0;
    --line: #465860;
    --action: #daeafd;
    --action-text: #193653;
    --focus: #9cd9fa;
    --playback-surface: #344450;
  }
  .brand img {
    filter: brightness(0) invert(92%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  font: inherit;
  color: inherit;
}
a {
  color: var(--action);
  text-underline-offset: 0.2em;
}
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 10px;
  z-index: 2;
  background: var(--surface);
  padding: 8px 12px;
}
.skip-link:not(:focus) {
  clip-path: inset(50%);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 72px;
}
.site-header a {
  text-decoration: none;
}
.site-header nav {
  display: flex;
  gap: clamp(8px, 2vw, 22px);
  font-size: 0.875rem;
  font-weight: 700;
}
.site-header nav a {
  display: grid;
  align-items: center;
  min-height: 44px;
}
.site-header nav a:hover,
.site-header [aria-current="page"] {
  text-decoration: underline;
}
.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  white-space: nowrap;
  font: 600 clamp(1.2rem, 3vw, 1.65rem)/1 var(--display);
}
.brand img {
  width: 34px;
}
.site-footer {
  margin-top: 32px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.hero {
  padding: clamp(22px, 5vw, 57px);
  border-radius: 12px;
  color: var(--ivory);
  background:
    linear-gradient(90deg, var(--navy) 32%, transparent 88%),
    url("assets/letter-garden.svg") right center / auto 100% no-repeat,
    var(--navy);
}
.hero h1 {
  font-size: clamp(1.95rem, 5.55vw, 3.7rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.045em;
}
.hero h1 span,
.hero .start-link {
  color: var(--gold);
}
.hero > p {
  margin-top: 14px;
  max-width: 45ch;
}
.hero a:focus-visible {
  outline-color: var(--ivory);
}

.kl-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 22px;
}
.store-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 135px;
}
.store-column a {
  display: flex;
  height: 40px;
  align-items: center;
}
.apple-badge { height: 40px; }
.google-badge { width: 135px; height: 40px; object-fit: contain; }
.store-coming-soon {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border: 1px dashed var(--ivory);
  border-radius: 4px;
  font-size: 0.8125rem;
  text-align: center;
}
.store-button {
  display: grid;
  min-width: 138px;
  min-height: 49px;
  padding: 7px 13px;
  border: 1px solid var(--ivory);
  border-radius: 7px;
  background: var(--ivory);
  color: var(--navy);
  text-align: left;
  text-decoration: none;
  line-height: 1.15;
  opacity: 1;
}
.store-button + .store-button {
  background: transparent;
  color: var(--ivory);
}
.store-button small {
  font-size: 0.7rem;
}
.store-button strong {
  font-size: 1rem;
  white-space: nowrap;
}
.start-link {
  display: grid;
  align-content: center;
  min-height: 44px;
  margin-inline-start: 5px;
  font-size: 0.875rem;
  font-weight: 700;
}
.kl-qr-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}
.kl-qr-group > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  line-height: 1.3;
}
.kl-qr-code {
  width: 100px;
  height: 100px;
  background: white;
}
.kl-qr-placeholder {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px dashed var(--ivory);
  border-radius: 4px;
  font-weight: 700;
}
.hero .store-note {
  margin-top: 8px;
  font-size: 0.8125rem;
  max-width: 70ch;
}

.kl-showcase {
  margin-top: 24px;
}
.kl-showcase.is-enhanced {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.kl-showcase.is-enhanced > * {
  grid-column: 1;
}
.feature-tabs {
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
}
.feature-tabs button {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
}
.feature-tabs button:not([aria-pressed="true"]):hover {
  background: var(--surface);
}
.feature-tabs [aria-pressed="true"] {
  background: var(--action);
  color: var(--action-text);
}
.tab-short {
  display: none;
}

.playback {
  grid-row: 2;
  place-self: start end;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 10px 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--action);
  position: relative;
  isolation: isolate;
}
.playback::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--playback-surface);
  z-index: -1;
}
.playback:hover::before {
  background: var(--surface);
}
.playback::after {
  content: "";
  width: 11px;
  height: 14px;
  border-inline: 3px solid currentColor;
}
.playback[aria-label="Play slideshow"]::after {
  width: 14px;
  border: 0;
  background: currentColor;
  clip-path: polygon(23% 0, 100% 50%, 23% 100%);
}
@media (forced-colors: active) {
  .playback {
    color: ButtonText;
    border: 1px solid ButtonText;
  }
  .playback::after {
    forced-color-adjust: none;
  }
  .feature-tabs [aria-pressed="true"] {
    color: HighlightText;
    background: Highlight;
    forced-color-adjust: none;
  }
}

.kl-show-panel {
  grid-row: 2;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: clamp(15px, 3vw, 30px);
  scroll-margin-top: 12px;
}
.kl-showcase:not(.is-enhanced) .kl-show-panel + .kl-show-panel {
  margin-top: 12px;
}
.is-enhanced .kl-show-panel header {
  padding-inline-end: 49px;
}
.kl-show-panel h2,
.help h2 {
  font: 600 clamp(1.7rem, 4.3vw, 2.75rem)/1.05 var(--display);
  letter-spacing: -0.024em;
}
.kl-show-panel h2 {
  margin-block: 4px 6px;
}
.eyebrow,
.kl-show-panel header p:first-child {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.kl-show-panel header p:last-child,
.kl-show-panel figcaption,
.kc-frequency,
.kc-detail {
  color: var(--muted);
}
.feature-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(10px, 2vw, 20px);
  max-width: 820px;
  margin: 17px auto 0;
}
.feature-examples figure {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}
.feature-examples h3 {
  font-size: 1rem;
}
.feature-examples h3 span,
.feature-examples figcaption,
.kc-detail,
.kc-frequency {
  font-size: 0.875rem;
}
.feature-examples img {
  width: 100%;
}
.kc-crop,
.kr-box,
.kg-captures {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.koine-sets-preview .feature-examples,
.kc-frequency {
  max-width: 620px;
}
.koine-cue-preview .feature-examples {
  max-width: 680px;
}
.kc-frequency,
.kc-detail {
  margin: 11px auto 0;
}
.koine-cue-preview .kc-crop,
.koine-guide-preview .kc-crop,
.kr-box,
.kg-captures {
  display: grid;
  align-content: center;
}
.kr-review img + img,
.kg-captures img + img {
  border-top: 1px solid #e0e6eb;
}
.koine-reader-comparison figure {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.koine-guide-preview .feature-examples {
  grid-template-columns: 1fr 1.18fr 1fr;
}
.koine-guide-preview .kc-crop {
  padding: 8px;
}
.kc-reader-key ul {
  margin: 0;
  padding-inline-start: 1.15em;
}
.kc-reader-key li + li {
  margin-top: 4px;
}
.home-help {
  margin-top: 28px;
  scroll-margin-top: 16px;
}
.home-help h2 {
  font: 600 clamp(1.7rem, 4.3vw, 2.75rem)/1.05 var(--display);
  letter-spacing: -0.024em;
}
.home-help-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.home-help-links article {
  padding: clamp(16px, 2.7vw, 25px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.home-help-links h3 {
  font-size: 1.125rem;
  line-height: 1.3;
}
.home-help-links h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.home-help-links p {
  color: var(--muted);
}

.help {
  max-width: 960px;
  margin-inline: auto;
}
.help-intro {
  padding-block: clamp(16px, 4vw, 45px) 23px;
}
.help h1 {
  font: 600 clamp(2.2rem, 5vw, 3.6rem)/1.05 var(--display);
  letter-spacing: -0.03em;
}
.help-intro p {
  margin-top: 8px;
  color: var(--muted);
}
.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  margin-top: 9px;
}
.help-links a {
  display: grid;
  align-content: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 700;
}
.starter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.starter {
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 2.6vw, 24px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  scroll-margin-top: 12px;
}
.starter h2 {
  margin-top: 6px;
}
#first-study-title {
  margin-bottom: 12px;
}
.starter h3 {
  margin-top: 6px;
  font: 600 clamp(1.4rem, 3vw, 1.8rem)/1.15 var(--display);
}
.starter ol {
  padding-inline-start: 23px;
}
.starter li {
  padding-inline-start: 2px;
}
.starter li + li {
  margin-top: 9px;
}
.starter > a {
  align-self: start;
  display: grid;
  align-content: center;
  min-height: 44px;
  margin-top: auto;
  font-weight: 700;
}
.faq,
.support {
  margin-top: 30px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq h2 {
  margin-bottom: 8px;
}
.faq summary {
  padding-block: 12px;
  cursor: pointer;
  font-weight: 700;
}
.faq details p {
  color: var(--muted);
  margin-bottom: 12px;
  max-width: 72ch;
}
.support p {
  margin-top: 8px;
  color: var(--muted);
}
.support a {
  display: inline-grid;
  align-content: center;
  min-height: 44px;
  font-weight: 700;
}
.settings-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 5px;
  font-weight: 700;
}
.settings-guide-sections section {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}
.settings-guide-sections h2,
.settings-guide-sections h3 {
  scroll-margin-top: 16px;
  margin-bottom: 8px;
}
.settings-guide-sections h3 {
  margin-top: 16px;
}
.settings-guide-sections p,
.settings-guide-sections li {
  max-width: 72ch;
}
.settings-guide-sections p + p,
.settings-guide-sections li + li {
  margin-top: 8px;
}

@media (min-width: 701px) {
  .feature-examples-aligned {
    grid-template-rows: auto auto auto;
    align-items: stretch;
    row-gap: 7px;
  }
  .feature-examples-aligned > figure {
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: stretch;
  }
}

@media (max-width: 700px) {
  .store-column .kl-qr-code {
    display: none;
  }
  .store-coming-soon {
    width: auto;
    height: auto;
    border: 0;
  }
  .hero {
    background-image:
      linear-gradient(90deg, var(--navy) 22%, transparent 95%),
      url("assets/letter-garden-phone.svg");
  }
  .feature-tabs {
    display: grid;
    grid-template-columns: repeat(
      auto-fit,
      minmax(min(100%, max(30%, 4.25rem)), 1fr)
    );
    width: min(100%, 390px);
    margin-inline: auto;
  }
  .feature-tabs button {
    padding-inline: 5px;
    font-size: 0.8125rem;
  }
  .tab-full {
    display: none;
  }
  .tab-short {
    display: inline;
  }
  .feature-examples,
  .koine-guide-preview .feature-examples,
  .starter-grid,
  .home-help-links {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-examples {
    max-width: 430px;
  }
}
@media (max-width: 550px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-block-start: 8px;
  }
  .site-header nav {
    gap: 18px;
  }
  .site-header nav a.home-nav {
    display: none;
  }
}
@media (max-width: 410px) {
  .store-button {
    min-width: 0;
    padding-inline: 9px;
  }
  .start-link {
    flex-basis: 100%;
    margin-inline-start: 0;
  }
}
