/* Screenshot Sort site — the teal the app ships with (Theme.kt, Seeds.teal),
   laid over a paper/slate neutral. Same structure as iread.gaiya.cc's site.css;
   only the hues differ, so the two sites read as one studio. */
:root {
  --paper: #F7FAF8;
  --ink: #14201D;
  --muted: #55655F;
  --teal: #0F6B5C;
  --teal-soft: rgba(15, 107, 92, 0.13);
  --card: #EDF3F0;
  --line: #DCE6E2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101614;
    --ink: #E4EDE9;
    --muted: #97A5A0;
    --teal: #6FD9C4;
    --teal-soft: rgba(111, 217, 196, 0.16);
    --card: #18211E;
    --line: #2B3733;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* iRead's headings are set in a serif because it is a reading app. This one is a
   utility that lives next to the system UI, so the display face is the same sans
   at a tighter track — the shared thing between the sites is the layout and the
   token names, not the typeface. */
.display { letter-spacing: -0.02em; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* nav */
.nav {
  display: flex; align-items: center; gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--teal);
  letter-spacing: -0.01em; margin-right: auto; text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.nav a.navlink { color: var(--muted); font-size: 15px; }
.nav a.navlink:hover { color: var(--ink); text-decoration: none; }

/* language dropdown: globe pill + custom menu */
.lang { position: relative; }
.langbtn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.langbtn:hover, .langbtn:focus-visible { border-color: var(--teal); color: var(--teal); }
.langbtn .chev { transition: transform 0.15s; }
.lang.open .langbtn .chev { transform: rotate(180deg); }
.langmenu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 148px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(20, 32, 29, 0.16);
}
.langmenu button {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; padding: 9px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink); font-size: 14px; font-family: inherit;
  cursor: pointer; text-align: left;
}
.langmenu button:hover { background: var(--teal-soft); }
.langmenu button.sel { color: var(--teal); font-weight: 600; }
.langmenu button .check { visibility: hidden; }
.langmenu button.sel .check { visibility: visible; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 13px 26px; font-size: 16px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: var(--paper); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px;
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 88px; padding: 30px 0 44px;
  color: var(--muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center;
}
.footer .brand { font-size: 16px; margin-right: 0; }
.footer .brand img { width: 22px; height: 22px; border-radius: 6px; }

@media (max-width: 720px) {
  .nav { gap: 14px; }
}

/* "Screenshot Sort" is a two-word wordmark with an icon in front of it, so the nav
   row runs out of width long before iRead's five-letter one does. Left on one line
   it does not merely look cramped: at a 390px viewport the language pill lands at
   x=412, so the whole document scrolls sideways and every section below reads as
   clipped. Below 560px the brand takes a row of its own and the links get the next
   one — measured 412px → 375px of scroll width. */
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; row-gap: 12px; }
  .brand { flex: 1 0 100%; margin-right: 0; }
  .lang { margin-left: auto; }
}

/* Both languages are real DOM text (indexable by search/AI crawlers); the html[data-lang]
   attribute only controls which one is visible. JS flips it, zh is the no-JS default. */
html[data-lang="zh"] .en, html[data-lang="en"] .zh { display: none; }

/* Inline permission / API names read as identifiers, not prose. */
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 5px;
  padding: 1px 5px;
}
