/* Andino Apps
   Paper, terracotta, Andean night and maize. Editorial serif + monospace for technical detail.
   No web fonts, cookies or trackers. */

:root {
  --paper: #f6f0e4;
  --paper-2: #efe6d4;
  --card: #fffdf8;
  --ink: #23264a;          /* andean night */
  --ink-soft: #4b4d6b;
  --muted: #77768a;
  --line: #ddd2bd;
  --clay: #b4472b;         /* terracotta */
  --clay-soft: #f3dccf;
  --maize: #e2a93b;
  --river: #2d6a6a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1120px;
  color-scheme: light;
  /* Woven band: stepped diamonds like an Andean textile border */
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Crect width='32' height='16' fill='%23b4472b'/%3E%3Cg fill='%2323264a'%3E%3Crect x='14' y='1' width='4' height='2'/%3E%3Crect x='12' y='3' width='8' height='2'/%3E%3Crect x='10' y='5' width='12' height='6'/%3E%3Crect x='12' y='11' width='8' height='2'/%3E%3Crect x='14' y='13' width='4' height='2'/%3E%3C/g%3E%3Crect x='14' y='7' width='4' height='2' fill='%23e2a93b'/%3E%3Cg fill='%23f6f0e4'%3E%3Crect x='0' y='7' width='4' height='2'/%3E%3Crect x='28' y='7' width='4' height='2'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16182c; --paper-2: #1c1f37; --card: #20233d; --ink: #f1ead9; --ink-soft: #cfc8b7;
    --muted: #9c98a8; --line: #343757; --clay: #e8754f; --clay-soft: #3b2522; --maize: #efbd59; --river: #6fb5b2;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.65 var(--sans); }
a { color: var(--clay); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; height: auto; }
code, .mono { font-family: var(--mono); font-size: .86em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--maize); outline-offset: 2px; }

.band { height: 12px; background: var(--band) repeat-x left center / auto 12px; }

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; }
.wordmark { font: 700 26px/1 var(--serif); letter-spacing: -.01em; }
.wordmark small { font: 600 11px/1 var(--mono); letter-spacing: .28em; color: var(--clay); margin-left: 6px; vertical-align: middle; }
.nav { display: flex; gap: 26px; font-size: 16px; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--clay); }
@media (max-width: 640px) { .nav { gap: 16px; font-size: 15px; } .nav .hide-sm { display: none; } .wordmark small { display: none; } }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
.display { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; margin: 0 0 22px; }
.display em { font-style: italic; color: var(--clay); }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; margin: 0 0 14px; }
h3 { font-size: 22px; margin: 0 0 6px; }
.lede { font-size: clamp(19px, 2vw, 22px); color: var(--ink-soft); max-width: 40ch; margin: 0 0 30px; }
.kicker { font: 600 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--clay); margin: 0 0 16px; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-block; font-weight: 650; text-decoration: none; padding: 13px 22px; border: 2px solid var(--ink); color: var(--ink); background: transparent; border-radius: 4px; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-clay { background: var(--clay); border-color: var(--clay); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.link-arrow { font-weight: 650; }

/* Layout blocks */
.hero { padding: 64px 0 80px; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
section { padding: 84px 0; }
.rule-top { border-top: 1px solid var(--line); }
.tinted { background: var(--paper-2); }

/* Founder note */
.note { max-width: 680px; font: 21px/1.6 var(--serif); }
.note p { margin: 0 0 16px; }
.signature { font: italic 22px var(--serif); color: var(--clay); }

/* App catalog rows */
.catalog { border-top: 2px solid var(--ink); }
.app-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 22px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); }
.app-row img { width: 72px; height: 72px; }
.app-row p { margin: 4px 0 0; color: var(--ink-soft); }
.status { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border: 1.5px solid currentColor; border-radius: 3px; white-space: nowrap; }
.status.live { color: var(--river); }
.status.lab { color: var(--muted); }
@media (max-width: 640px) { .app-row { grid-template-columns: 56px 1fr; } .app-row img { width: 56px; height: 56px; } .app-row .status { grid-column: 2; justify-self: start; } }

/* Spec sheet */
.spec { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; border-top: 2px solid var(--ink); margin: 0; }
.spec dt, .spec dd { padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.spec dt { font: 600 13px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-right: 18px; }
@media (max-width: 640px) { .spec { grid-template-columns: 1fr; } .spec dt { border-bottom: 0; padding-bottom: 0; } }

/* Product mock-ups */
.window { background: var(--card); border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: 8px 8px 0 var(--ink); overflow: hidden; color: #23264a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .window { background: #fffdf8; box-shadow: 8px 8px 0 #000; } }
.window-bar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e3dccd; background: #f8f4ea; font: 12px var(--mono); color: #77768a; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ddd2bd; display: inline-block; }
.window-bar span { margin-left: 8px; }
.window-body { padding: 18px; font: 14px/1.5 var(--sans); }

.gchat .who { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #5f6368; margin-bottom: 8px; }
.gchat .who b { color: #202124; }
.gchat .app-badge { border: 1px solid #dadce0; border-radius: 4px; padding: 0 4px; font-size: 11px; }
.gchat .bubble { background: #f1f3f4; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; color: #202124; }
.gcard { border: 1px solid #dadce0; border-radius: 10px; overflow: hidden; }
.gcard header { padding: 12px 14px; border-bottom: 1px solid #e8eaed; }
.gcard header b { display: block; font-size: 15px; color: #202124; }
.gcard header span, .gcard dt { font-size: 12px; color: #5f6368; }
.gcard dl { margin: 0; padding: 10px 14px 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcard dd { margin: 0; color: #202124; }
.gcard .open { display: inline-block; margin: 6px 14px 14px; padding: 5px 14px; border: 1px solid #dadce0; border-radius: 999px; color: #1a73e8; font-weight: 600; font-size: 13px; }
.gchat .thread { font-size: 13px; color: #1a73e8; margin-top: 10px; }

.rules-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rules-table th { text-align: left; font-size: 12px; color: #6b6e8a; font-weight: 600; padding: 0 8px 8px; border-bottom: 2px solid #e3dccd; }
.rules-table td { padding: 10px 8px; border-bottom: 1px solid #eee7d9; vertical-align: top; }
.rules-table code { font-size: 12px; background: #f3eee2; padding: 1px 5px; border-radius: 3px; }
.on { font: 600 11px var(--mono); background: #e3f2e9; color: #216e44; padding: 2px 7px; border-radius: 3px; }

.stack { position: relative; }
.stack .window + .window { margin-top: -28px; margin-left: 48px; position: relative; }
@media (max-width: 640px) { .stack .window + .window { margin-left: 16px; } }

/* Flow strip */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.flow div { padding: 20px; border-right: 1px solid var(--line); background: var(--card); }
.flow div:last-child { border-right: 0; }
.flow b { display: block; font-family: var(--serif); font-size: 20px; margin: 6px 0 4px; }
.flow span { font-size: 15.5px; color: var(--ink-soft); }
.flow .n { font: 600 12px var(--mono); color: var(--clay); }
@media (max-width: 800px) { .flow { grid-template-columns: 1fr 1fr; } .flow div:nth-child(2) { border-right: 0; } .flow div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 480px) { .flow { grid-template-columns: 1fr; } .flow div { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Notice + changelog + FAQ */
.notice { border: 2px solid var(--clay); background: var(--clay-soft); padding: 22px 26px; border-radius: 6px; }
.notice p { margin: 0; }
.changelog { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--ink); }
.changelog li { padding: 0 0 22px 22px; position: relative; }
.changelog li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; background: var(--maize); border: 2px solid var(--ink); }
.changelog .ver { font: 600 13px var(--mono); color: var(--clay); }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 2px solid var(--ink); }
summary { cursor: pointer; font: 700 20px/1.3 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--clay); }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-soft); margin: 10px 0 0; max-width: 70ch; }

/* Long-form pages */
.prose { max-width: 760px; padding-top: 40px; padding-bottom: 90px; }
.prose h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.05; margin: 0 0 10px; }
.prose h2 { font-size: 26px; margin: 46px 0 8px; }
.prose h3 { font-size: 20px; margin: 26px 0 6px; }
.prose .meta { font: 13px var(--mono); color: var(--muted); margin: 0 0 34px; letter-spacing: .04em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 14px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 2px solid var(--ink); }
.prose code { overflow-wrap: anywhere; background: var(--paper-2); padding: 1px 6px; border-radius: 3px; }
.prose li + li { margin-top: 6px; }
.prose .card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; padding: 22px; box-shadow: 5px 5px 0 var(--ink); }
.prose .card h3 { margin-top: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

/* Footer */
.site-footer { margin-top: 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-top: 30px; padding-bottom: 40px; font-size: 15px; color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }
.fine { font-size: 13.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
