/* Hosts Manager site: native CSS, no build step (GitHub Pages).
   Shape rule: cards 16px, images 12px, buttons + pills full-pill. One accent (the app's network blue). */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --text: #17181c;
  --muted: #52545c;
  --faint: #8b8d96;
  --line: #e3e4e8;
  --accent: #1f63d6;          /* white text on it: 5.6:1 */
  --accent-text: #1a56bd;     /* links on --bg: 6.4:1 */
  --accent-soft: #e6eefc;
  --sand: #f3e2c4;            /* warm tint (v1.0 fox mascot) */
  --shadow: 0 1px 2px rgb(23 35 66 / .06), 0 12px 40px -12px rgb(23 35 66 / .18);
  --radius-card: 16px;
  --radius-img: 12px;
  --max: 1180px;
  --font: "Geist", "Sukhumvit Set", "Thonburi", "Noto Sans Thai", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d10;
    --surface: #15161a;
    --surface-2: #1c1d22;
    --text: #f2f2f4;
    --muted: #a3a5ae;
    --faint: #70727b;
    --line: #26282e;
    --accent: #2563e0;        /* white text: 5.0:1 */
    --accent-text: #79a8ff;   /* links on --bg: 7.9:1 */
    --accent-soft: #14213a;
    --sand: #3a2f1f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 50px -16px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { overflow-wrap: anywhere; }  /* long paths (/Library/Application Support/…) on phones */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Language: every string ships in both languages; the <html> class picks one (set before first paint). */
html:not(.th) .th, html.th .en { display: none !important; }
/* Other languages hide the page until site.js swaps their text in (at most 1.5 s), so English doesn't flash first */
html.i18n-wait body { visibility: hidden; animation: i18n-show 0s 1.5s forwards; }
@keyframes i18n-show { to { visibility: visible; } }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--surface); padding: 8px 14px; }

/* ── Header ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); backdrop-filter: none; } }
.nav { height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button {
  font: 500 12px var(--font); color: var(--muted); background: none; border: 0;
  border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
/* Language picker: header button + modal <dialog> with search (site.js builds the dialog for every page).
   ponytail: the old .lang pill rules above stay until gomin2013.github.io (which borrows this file) ships the button. */
.lang-btn {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font: 500 13px var(--font); color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px 5px 9px;
}
.lang-btn:hover { color: var(--text); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-btn .lang-code { display: none; }
.nav-links a > i { display: none; }
/* Phones: Download / About become icons (their text stays for screen readers), the language button shows its short
   code. The app name and the code show only while they fit — breakpoints measured with the widest code, "zh-tw". */
@media (max-width: 800px) {
  .brand { white-space: nowrap; }
  .nav-links:has(a > i) { gap: 4px; }
  .nav-links a:has(> i) { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; font-size: 0; }
  .nav-links a > i { display: block; font-size: 20px; }
  .nav-links a[aria-current="page"]:has(> i) { background: var(--surface-2); }
  .lang-btn .lang-name { display: none; }
  .lang-btn .lang-code { display: inline; }
}
@media (max-width: 400px) { .brand:has(img) { font-size: 0; } }  /* icon only; the name stays for screen readers */
@media (max-width: 270px) { .lang-btn .lang-code { display: none; } .lang-btn { padding: 7px; } }  /* globe only */
@media (max-width: 480px) { .btn { white-space: normal; } }
html:has(.lang-dialog[open]) { overflow: hidden; }
.lang-dialog {
  width: min(420px, calc(100vw - 32px)); max-height: min(580px, calc(100dvh - 48px)); padding: 0;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.lang-dialog[open] { display: flex; animation: lang-in .2s var(--ease); }
.lang-dialog::backdrop { background: rgb(10 12 18 / .45); backdrop-filter: blur(4px); }
.lang-panel { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 0; padding: 16px; }
.lang-head { display: flex; align-items: center; justify-content: space-between; padding-left: 4px; }
.lang-head h2 { font-size: 18px; margin: 0; }
.lang-close {
  display: grid; place-items: center; width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  color: var(--muted); background: var(--surface-2); border: 0; border-radius: 999px;
}
.lang-close:hover { color: var(--text); }
.lang-search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--faint);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.lang-search:focus-within { border-color: var(--accent); }
.lang-search input {
  flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: none;
  font: 15px var(--font); color: var(--text);
}
.lang-options { list-style: none; margin: 0; padding: 0; min-height: 0; overflow-y: auto; display: grid; gap: 2px; }
.lang-options button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  font: 500 15px var(--font); color: var(--text); background: none; border: 0; border-radius: 10px; padding: 10px 12px;
}
.lang-options button:hover, .lang-options button:focus-visible { background: var(--surface-2); outline: none; }
.lang-options .flag { font-size: 20px; line-height: 1; }
.lang-options small { color: var(--faint); font-size: 13px; font-weight: 400; }
.lang-options [aria-current="true"]::after { content: "✓"; margin-left: auto; color: var(--accent-text); font-weight: 600; }
.lang-empty { margin: 8px 0 12px; text-align: center; color: var(--muted); font-size: 14px; }
@keyframes lang-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .lang-dialog[open] { animation: none; } }
@media (max-width: 800px) {  /* 800: the full header needs up to 784px (Russian) */
  .nav { gap: 14px; }
  .nav-links { gap: 14px; }
  .nav-links .hide-sm { display: none; }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 600 16px var(--font); text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s;
}
.btn i { font-size: 20px; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { color: var(--text); border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--faint); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 14px; color: var(--muted); }

/* ── Type ─────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; margin: 0; font-weight: 650; overflow-wrap: break-word; hyphens: auto; }  /* long ru/vi/id words on phones */
h1 { font-size: clamp(40px, 5.2vw, 64px); }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.3; }
html:is(.th, :lang(vi), :lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3) { line-height: 1.3; letter-spacing: 0; }
.lede { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 18px 0 0; }
.eyebrow { font: 500 13px var(--mono); color: var(--accent-text); letter-spacing: .02em; margin: 0 0 14px; }
section { padding: 96px 0; }
@media (max-width: 760px) { section { padding: 64px 0; } }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); margin: 14px 0 0; }

/* ── Hero (asymmetric split) ──────────────────────────── */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero-copy .cta-row { margin-top: 32px; }
.hero-copy .cta-note { margin-top: 14px; }
.hero-shot { position: relative; margin-right: -120px; }
.hero-shot .shot { width: 100%; }
.hero-shot .fox {  /* mascot (glass robot since v1.1; class name kept) */
  position: absolute; width: 132px; left: -44px; bottom: -18px;
  filter: drop-shadow(0 10px 18px rgb(0 0 0 / .18));
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-shot { margin-right: 0; }
  .hero-shot .fox { width: 96px; left: -6px; bottom: -14px; }
}

/* ── Facts strip ──────────────────────────────────────── */
.facts { padding: 24px 0 8px; }
.facts ul {
  list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--muted); }
.facts i { font-size: 24px; color: var(--accent-text); flex: none; }
.facts strong { color: var(--text); font-weight: 600; display: block; }
@media (max-width: 860px) { .facts ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .facts ul { grid-template-columns: 1fr; } }

/* ── Bento ────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 28px; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 10px;
}
.cell p { margin: 0; color: var(--muted); font-size: 16px; }
.cell .ico { font-size: 26px; color: var(--accent-text); }
.cell-a { grid-column: span 4; grid-row: span 2; }
.cell-a img { margin: 18px -28px -28px 0; border-radius: var(--radius-img) 0 0 0; border: 1px solid var(--line); border-right: 0; border-bottom: 0; }
.cell-b, .cell-c { grid-column: span 2; }
.cell-d { grid-column: span 3; grid-row: span 2; background: linear-gradient(140deg, var(--accent-soft), var(--surface) 70%); }
.cell-d img { width: min(100%, 320px); margin-top: 8px; border-radius: var(--radius-img); border: 1px solid var(--line); }
.cell-e, .cell-g { grid-column: span 3; }
.swatches { display: grid; grid-template-columns: repeat(8, 22px); gap: 10px; margin-top: 16px; }
.swatches span { width: 22px; height: 22px; border-radius: 50%; background: var(--c); }
.gradients { display: grid; grid-template-columns: repeat(4, 56px); gap: 10px; margin-top: 14px; }
.gradients span { height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--a), var(--b)); }
.cell pre {
  margin: 8px 0 0; padding: 14px 16px; border-radius: var(--radius-img); background: var(--surface-2);
  font-size: 13px; line-height: 1.7; overflow-x: auto; color: var(--text);
}
.cell pre .c { color: var(--faint); }
.cell pre .off { color: var(--faint); text-decoration: line-through; }
kbd {
  font-size: 13px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
}
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-a, .cell-d, .cell-e, .cell-g { grid-column: span 2; grid-row: auto; }
  .cell-b, .cell-c { grid-column: span 1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .cell-a, .cell-b, .cell-c, .cell-d, .cell-e, .cell-g { grid-column: auto; }
}

/* ── Save pipeline (horizontal flow) ──────────────────── */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.flow li { position: relative; padding: 0 18px 0 0; }
.flow li::before {
  content: ""; position: absolute; top: 22px; left: 52px; right: 6px; height: 1px; background: var(--line);
}
.flow li:last-child::before { display: none; }
.flow .dot {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-size: 22px; position: relative;
}
.flow h3 { font-size: 17px; margin: 18px 0 6px; }
.flow p { margin: 0; font-size: 15px; color: var(--muted); }
.pin-note {
  margin-top: 48px; display: flex; gap: 14px; align-items: flex-start; max-width: 760px;
  padding: 20px 22px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line);
}
.pin-note i { font-size: 24px; color: var(--accent-text); flex: none; margin-top: 2px; }
.pin-note p { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 26px; }
  .flow li { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; padding: 0; }
  .flow li::before { top: 52px; bottom: -22px; left: 22px; right: auto; width: 1px; height: auto; }
  .flow h3 { margin: 10px 0 4px; }
  .flow .dot { grid-row: span 2; }
}

/* ── AI split ─────────────────────────────────────────── */
.ai { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.ai-visual { position: relative; padding: 0 0 40px 40px; }
.ai-visual .panel { width: 46%; border-radius: var(--radius-img); box-shadow: var(--shadow); border: 1px solid var(--line); }
.ai-visual .editor {
  position: absolute; right: 0; bottom: 0; width: 78%; border-radius: var(--radius-img);
  box-shadow: var(--shadow);
}
.ai-copy ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.ai-copy li { display: flex; gap: 12px; color: var(--muted); }
.ai-copy li i { color: var(--accent-text); font-size: 22px; flex: none; margin-top: 2px; }
.logos { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; margin-top: 30px; }
.logos img { height: 26px; width: auto; }
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: 1fr; gap: 40px; }
  .ai-visual { padding: 0 0 30px 0; }
}

/* ── Sibling app ──────────────────────────────────────── */
.sibling {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center;
  padding: 44px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line);
  overflow: hidden;
}
.sibling .who { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sibling .who img { width: 56px; height: 56px; border-radius: 13px; }
.sibling p { color: var(--muted); }
.sibling .shot { margin-right: -120px; border-radius: var(--radius-img); }
@media (max-width: 900px) {
  .sibling { grid-template-columns: minmax(0, 1fr); padding: 28px; }
  .sibling .shot { margin-right: 0; }
}

/* ── Closing CTA ──────────────────────────────────────── */
.closing { text-align: left; }
.closing-inner {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  padding: 48px; border-radius: var(--radius-card);
  background: linear-gradient(120deg, var(--accent-soft), var(--surface) 55%, color-mix(in srgb, var(--sand) 55%, var(--surface)));
  border: 1px solid var(--line);
}
.closing-inner img { width: 168px; }
.closing-inner .cta-row { margin-top: 24px; }
@media (max-width: 760px) {
  .closing-inner { grid-template-columns: 1fr; padding: 30px; }
  .closing-inner img { width: 120px; }
}

/* ── Inner pages ──────────────────────────────────────── */
.page-hero { padding: 72px 0 24px; }
.page-hero p { color: var(--muted); max-width: 60ch; }
.prose { max-width: 720px; }
.prose h2 { font-size: 26px; margin: 48px 0 12px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); overflow-wrap: anywhere; }  /* plain-text paths like /Library/Application Support/… */
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.prose .updated { font: 500 14px var(--mono); color: var(--faint); }
.code-block {
  margin: 14px 0; padding: 16px 18px; border-radius: var(--radius-img); background: var(--surface);
  border: 1px solid var(--line); overflow-x: auto; font-size: 14px; line-height: 1.7;
}
.install { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.install-steps li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 20px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line);
}
.install-steps i { font-size: 26px; color: var(--accent-text); }
.install-steps h3 { font-size: 17px; margin: 0 0 4px; }
.install-steps p { margin: 0; color: var(--muted); font-size: 15px; }
.dl-card {
  position: sticky; top: 88px; padding: 32px; border-radius: var(--radius-card); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.dl-card .app { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.dl-card .app img { width: 64px; height: 64px; border-radius: 15px; }
.dl-card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 24px 0 0; font-size: 15px; }
.dl-card dt { color: var(--faint); }
.dl-card dd { margin: 0; overflow-wrap: anywhere; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }  /* minmax: long <pre> lines scroll */
@media (max-width: 900px) {
  .install, .split-2 { grid-template-columns: minmax(0, 1fr); gap: 32px; }  /* minmax: long <pre> lines scroll instead of widening the page */
  .dl-card { position: static; }
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 40px; }
.foot { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot nav a:hover { color: var(--text); }
.foot small { color: var(--faint); font-size: 13px; width: 100%; }

/* Footer, two rows on product sites: the site's own pages, then the Gomin family (same markup on every site) */
.foot-links { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-left: auto; }
.foot-links nav { margin-left: 0; justify-content: flex-end; }
.foot nav { gap: 8px 0; }
.foot nav a + a { border-left: 1px solid var(--line); margin-left: 14px; padding-left: 14px; }
.foot-links, .foot-links nav { min-width: 0; max-width: 100%; }
/* phones: rows wrap, so a bar would start a line — use plain gaps instead */
@media (max-width: 720px) {
  .foot-links { width: 100%; align-items: flex-start; margin-left: 0; }
  .foot-links nav { justify-content: flex-start; gap: 8px 18px; }
  .foot-links nav a + a { border-left: 0; margin-left: 0; padding-left: 0; }
}

/* ── Motion (only when the user hasn't asked for less) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal[data-d="1"] { transition-delay: .08s; }
  .reveal[data-d="2"] { transition-delay: .16s; }
  .reveal[data-d="3"] { transition-delay: .24s; }
  .hero-shot .fox { animation: peek .9s .5s var(--ease) both; }
  @keyframes peek { from { opacity: 0; transform: translateY(24px) rotate(-6deg); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
