@font-face {
  font-family: Plex;
  src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Space;
  src: url("fonts/SpaceGrotesk-Bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
}
:root {
  color-scheme: light;
  --paper: #f8f7f1;
  --ink: #172e31;
  --teal: #12625f;
  --muted: #4d6260;
  --line: #d3d9cd;
  --display: Space, Plex, sans-serif;
  font: 100%/1.5 Plex, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: .23em; }
:where(a, summary, button, input, textarea):focus-visible { outline: 3px solid #a84e09; outline-offset: 4px; }
.wrap { width: min(1200px, calc(100% - clamp(2rem, 9vw, 9rem))); margin-inline: auto; }
.skip { position: absolute; top: -5rem; left: 1rem; z-index: 2; padding: .7rem; background: white; }
.skip:focus { top: .5rem; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mast { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.mast .brand { justify-self: start; }
.mast nav { justify-self: end; }
.brand { display: inline-flex; align-items: center; font: 700 1.38rem/1 var(--display); letter-spacing: -.06em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--teal); }
.brand img { width: 2.2rem; height: 2.2rem; border-radius: 25%; margin-right: .55rem; }
nav { display: flex; align-items: center; gap: clamp(.7rem, 2.8vw, 2.4rem); flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; padding-block: .45rem; }
nav a:hover, nav a[aria-current] { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.language-picker { position: relative; }
.language-picker summary { display: flex; min-height: 44px; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 2rem; padding: .38rem .85rem; cursor: pointer; }
.language-picker summary bdi { min-inline-size: 0; max-inline-size: clamp(5rem, 25vw, 12rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; flex: 0 0 1.5rem; direction: ltr; text-align: center; }
.language-panel { position: absolute; z-index: 5; inset-inline-end: 0; top: calc(100% + .5rem); width: min(20rem, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: .8rem; background: #fffdf7; box-shadow: 0 8px 24px #19393020; padding: .6rem; }
.language-search input { width: 100%; min-height: 44px; border: 1px solid #849a90; border-radius: .45rem; margin-bottom: .35rem; padding: .45rem .6rem; font: inherit; color: var(--ink); background: white; }
.language-list { max-height: min(22rem, 50dvh); overflow-y: auto; list-style: none; padding: .1rem; margin: 0; }
.language-list a { display: flex; min-height: 44px; align-items: center; border-radius: .4rem; gap: .6rem; padding: .35rem .55rem; color: var(--ink); text-decoration: none; }
.language-list a:hover, .language-list a[aria-current] { background: #edf1e8; }
.language-check { margin-inline-start: auto; color: var(--teal); }
.language-empty { margin: .5rem; color: var(--muted); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 7vw, 7rem); }
.platforms { display: flex; align-items: center; gap: .65rem; font-size: .86rem; color: var(--muted); margin: 0 0 1.35rem; }
.platforms::before { content: ""; height: 2px; width: 1.8rem; background: var(--teal); }
.platforms span { color: var(--teal); }
h1,h2,h3 { font-family: var(--display); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(3rem, 5.6vw, 5.65rem); line-height: 1.03; letter-spacing: -.064em; margin: 0; }
h1 em { color: var(--teal); font-style: normal; }
.lead { font-size: clamp(1.07rem, 1.55vw, 1.3rem); color: var(--muted); max-width: 42ch; line-height: 1.55; margin: 1.45rem 0 1.8rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.app-store-badge img { display: block; width: auto; height: 48px; }
.cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.6rem; font-size: 1rem; padding: .83rem 1.25rem; background: var(--teal); color: white; border-radius: .55rem; text-decoration: none; }
.cta:hover { background: #084f4d; }
.study-surface { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: clamp(1rem, 2vw, 1.65rem); padding: clamp(1.5rem, 3vw, 2.5rem); background: radial-gradient(#93b6a6 1px, transparent 1.3px) 0 0/16px 16px, #d5e6d8; border-radius: 1.4rem; }
.study-app-preview { display: block; justify-self: center; width: 100%; max-width: 13.5rem; height: auto; border: 1px solid #bbc9b8; border-radius: 1.05rem; box-shadow: 0 8px 18px #19393022; }
.study-card { position: relative; border: 1px solid #bbc9b8; background: #fffaf1; margin: 0; border-radius: .9rem; box-shadow: 0 8px 18px #19393018; }
.study-card::before, .study-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; border: 1px solid #a1b9a8; }
.study-card::before { background: #e5eddb; transform: rotate(-5deg); }
.study-card::after { background: #f4eddc; transform: rotate(3deg); }
.study-card header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem .75rem; border-bottom: 1px solid #e4dfd2; color: #50645a; font-size: .83rem; letter-spacing: .08em; }
.card-face { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: center; padding: 1.4rem 1.2rem; gap: .45rem; }
.card-face img { width: 100%; max-width: 245px; height: auto; mix-blend-mode: multiply; }
.card-face div { display: grid; justify-items: center; gap: .4rem; color: var(--teal); }
.card-face strong { color: #263931; font: 500 clamp(3rem, 5vw, 4.5rem)/1.1 "Songti SC","Noto Serif CJK SC",serif; }
.card-face div span { font-size: 1.25rem; }
.answer { margin: 0 1.25rem; border-top: 1px solid #d7d8c9; }
.answer summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: .75rem 0; color: var(--teal); }
.answer summary::-webkit-details-marker { display: none; }
.answer .hide, .answer[open] .show { display: none; }
.answer[open] .hide { display: inline; }
.turn { font: 1.45rem/1 sans-serif; }
.solution { display: flex; flex-wrap: wrap; column-gap: 1rem; align-items: baseline; padding: 0 0 1rem; font-size: .97rem; }
.solution b { font: 700 1.22rem var(--display); }
.features { border-top: 1px solid var(--line); padding: 2.3rem 0 3.8rem; }
.features h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); letter-spacing: -.05em; margin: 0 0 1.7rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.feature-grid article + article { border-inline-start: 1px solid var(--line); padding-inline-start: 2rem; }
.feature-grid h3 { font-size: 1.22rem; letter-spacing: -.035em; margin: 0 0 .4rem; }
.feature-grid p, .articles p { margin: 0; line-height: 1.65; color: var(--muted); }
.reading { max-width: 800px; padding-block: clamp(2.5rem, 6vw, 5rem); }
.reading h1 { font-size: clamp(2.7rem, 5.4vw, 4.7rem); }
.intro .lead { max-width: 55ch; }
.articles section { scroll-margin-top: 2rem; border-top: 1px solid var(--line); padding-block: 1.4rem; }
.articles h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); letter-spacing: -.035em; margin: 0 0 .55rem; }
.foot { border-top: 1px solid var(--line); padding-block: 1.5rem; }
.foot .brand { font-size: 1.1rem; }
.foot:has(+ .feedback-widget) { padding-bottom: 5rem; }
.feedback-page { max-width: 680px; }
.feedback-panel, .feedback-card { border: 1px solid var(--line); border-radius: .9rem; background: #fffdf7; padding: clamp(1rem, 3vw, 1.65rem); }
.feedback-form { display: grid; gap: .7rem; }
.feedback-form label { color: var(--ink); }
.feedback-form fieldset { display: flex; margin: 0 0 .45rem; padding: 0; border: 0; flex-wrap: wrap; gap: .3rem 1rem; }
.feedback-form legend { padding: 0; margin-bottom: .25rem; }
.feedback-form fieldset label { display: flex; min-height: 2.5rem; align-items: center; gap: .35rem; }
.feedback-form input[type="radio"] { accent-color: var(--teal); }
.feedback-form input[type="email"], .feedback-form textarea { width: 100%; min-height: 2.75rem; padding: .65rem; font: inherit; color: var(--ink); border: 1px solid #849a90; border-radius: .4rem; background: white; }
.feedback-form textarea { resize: vertical; }
.feedback-form .cta { justify-self: start; min-height: 2.75rem; border: 0; font: inherit; cursor: pointer; }
.feedback-form p, .feedback-email { font-size: .92rem; color: var(--muted); margin: 0; }
.feedback-email { margin-top: 1rem; }
.feedback-status { margin: 0 0 1rem; color: var(--teal); }
.feedback-status[role="alert"] { color: #8d311c; }
.feedback-widget { position: fixed; z-index: 3; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); }
.feedback-widget summary { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .55rem 1rem; margin-left: auto; width: max-content; border: 1px solid var(--teal); border-radius: 1.5rem; background: var(--paper); color: var(--teal); box-shadow: 0 4px 14px #19393020; cursor: pointer; }
.feedback-widget summary::-webkit-details-marker { display: none; }
.feedback-panel { width: min(24rem, calc(100vw - 2rem)); max-height: calc(100vh - 5.5rem); max-height: calc(100dvh - 5.5rem); overflow: auto; position: absolute; right: 0; bottom: calc(100% + .6rem); box-shadow: 0 8px 24px #19393020; }
.directory { max-width: 960px; padding-block: clamp(2.4rem, 6vw, 5rem); }
.directory h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.08; overflow-wrap: anywhere; }
.directory-top { display: flex; justify-content: space-between; gap: 1.25rem; align-items: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.directory-tabs { border-bottom: 1px solid var(--line); gap: 1.55rem; }
.directory-tabs a { color: var(--muted); padding: .6rem .1rem .75rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.directory-tabs a[aria-current] { color: var(--teal); border-color: var(--teal); text-decoration: none; }
.directory-list { list-style: none; margin: 0; padding: 0; }
.directory-row { border-bottom: 1px solid var(--line); }
.directory-row a { display: grid; grid-template-columns: minmax(0,1fr) 7em 8em 1em; align-items: center; gap: 1rem; padding: 1.15rem .3rem; text-decoration: none; color: var(--ink); }
.directory-row a:hover { background: #edf1e8; }
.directory-row strong { font: 700 clamp(1.1rem,2vw,1.4rem)/1.3 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.directory-row .directory-meta { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .65rem; row-gap: .14rem; margin-top: .25rem; }
.directory-languages { display: inline-flex; align-items: center; gap: .28rem; }
.directory-languages .language-flag { flex: none; font-size: 1rem; line-height: 1; }
.directory-row small, .directory-count, .directory-row time, .detail-numbers, .import-help { font-size: .91rem; color: var(--muted); }
.directory-count, .directory-row time { text-align: end; font-variant-numeric: tabular-nums; }
.row-arrow { color: var(--teal); }
.back-link { display: inline-block; margin-bottom: 1.6rem; }
.detail, .contribution { max-width: 760px; }
.directory h2 { font-size: 1.45rem; margin: 0 0 .85rem; line-height: 1.3; }
.deck-summary { font-size: 1.13rem; color: var(--muted); line-height: 1.65; max-width: 65ch; white-space: pre-line; }
.detail-numbers { margin: 1rem 0 2rem; }
.detail-numbers > span:first-child { margin-inline: .4rem; }
.detail-numbers .directory-languages { margin-inline-start: .65rem; }
.detail-files, .detail-credits { border-top: 1px solid var(--line); padding-block: 1.5rem; }
.file-download { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: .9rem 0; text-decoration: none; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.file-download:hover > span { text-decoration: underline; }
.file-download small { color: var(--muted); font-variant-numeric: tabular-nums; }
.import-help { display: inline-block; margin-top: 1rem; }
.detail-credits img { float: right; width: min(24%,150px); height: auto; margin: 0 0 1rem 1rem; }
.detail-credits dl { display: grid; grid-template-columns: fit-content(36%) 1fr; gap: .5rem 1.5rem; margin: 0; }
.detail-credits dt { color: var(--muted); }
.detail-credits dd { margin: 0; overflow-wrap: anywhere; }
.contribution-form { display: grid; gap: 1rem; max-width: 38rem; margin-top: 1.5rem; }
.contribution-form input:not([type=checkbox]), .contribution-form textarea { width: 100%; margin-top: .3rem; padding: .65rem; font: inherit; color: var(--ink); background: #fffdf7; border: 1px solid #849a90; border-radius: .4rem; }
.contribution-form textarea { resize: vertical; }
.contribution-form .cta { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.rights-check { display: flex; align-items: baseline; gap: .4rem; }
.form-error { color: #8d311c; }
.moderation .directory-tabs { margin: 1.6rem 0; }
.review-entry { padding-block: 1.2rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.review-description { white-space: pre-line; }
.review-entry dl { display: grid; grid-template-columns: fit-content(38%) 1fr; gap: .45rem 1rem; }
.review-entry dt { color: var(--muted); }
.review-entry dd { margin: 0; min-width: 0; }
.review-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.review-actions button { font: inherit; cursor: pointer; }
.review-actions .cta { border: 0; }
.review-decline { padding: .65rem 1.1rem; border: 1px solid var(--line); border-radius: .55rem; color: #813b2c; background: var(--paper); }
@media (max-width: 600px) {
  .directory-top { align-items: start; flex-direction: column; gap: 1rem; }
  .directory-row a { grid-template-columns: minmax(0,1fr) auto; gap: .18rem .65rem; padding-block: .95rem; }
  .directory-row a > div { grid-row: span 2; }
  .directory-row time { grid-column: 2; font-size: .78rem; }
  .row-arrow { display: none; }
  .detail-credits img { float: none; margin-left: 0; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 2.25rem; }
  .study-surface { max-width: 36rem; width: 100%; justify-self: center; }
}
@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .feature-grid article + article { border-inline-start: 0; border-top: 1px solid var(--line); padding: 1.2rem 0 0; }
}
@media (max-width: 520px) {
  .mast { grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .55rem; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; gap: .4rem .75rem; font-size: .94rem; }
  .mast .language-picker { justify-self: end; max-inline-size: 100%; }
  .hero { padding-top: 2.4rem; }
  .study-surface { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; }
  .card-face { padding: 1rem .75rem; }
  .foot { align-items: flex-start; flex-wrap: wrap; }
}
