/* download.studily.org — public download portal.
 * Studily white/black modern language. */

:root {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --card-sub: #FAFAFA;
  --border: #E5E5E5;
  --ink: #0A0A0A;
  --ink-secondary: #404040;
  --muted: #737373;
  --subtle: #F5F5F5;
  --accent: #0EA5E9;
  --radius: 16px;
  --radius-full: 9999px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 18px; width: 100%; }
.main { flex: 1; padding-bottom: 60px; }

.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; gap: 12px;
  color: var(--muted); font-size: 14px; font-weight: 500;
}

/* ─── Chrome ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 860px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; gap: 14px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 15px; }
.nav-brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: var(--ink-secondary); text-decoration: none; font-size: 13.5px; font-weight: 600;
  padding: 7px 12px; border-radius: var(--radius-full);
}
.nav-links a:hover { background: var(--subtle); color: var(--ink); }
.nav-links a.on { color: var(--ink); background: var(--subtle); }

.footer { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 20px; }
.footer-inner {
  max-width: 860px; margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 12.5px;
}
.footer-inner a { color: var(--ink-secondary); text-decoration: none; font-weight: 600; }
.footer-inner a:hover { color: var(--ink); }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding: 46px 0 30px; text-align: center; }
.hero-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.hero h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: -1px; }
.hero .sub { color: var(--ink-secondary); font-size: 15.5px; margin-top: 10px; max-width: 520px; margin-left: auto; margin-right: auto; }
.ver-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.ver-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 5px 13px; font-size: 12px; font-weight: 700; color: var(--ink-secondary);
  background: var(--card-sub);
}
.ver-chip b { color: var(--ink); }

/* ─── Download cards ────────────────────────────────────────────────────── */
.dl-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-top: 18px;
}
.dl-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; background: #FFF; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.dl-card.rec { border: 2px solid #0A0A0A; }
.dl-card .plat { font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.dl-card .name { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; }
.dl-card .meta { color: var(--muted); font-size: 12.5px; flex: 1; }
.dl-card .meta .sz { margin-left: 4px; }
.dl-card a.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #0A0A0A; color: #FFF; border-radius: var(--radius-full);
  padding: 10px 18px; font-size: 13.5px; font-weight: 700; text-decoration: none;
  margin-top: 4px; transition: transform 0.1s ease;
}
.dl-card a.dl-btn:hover { transform: translateY(-1px); }
.dl-card a.dl-btn.store { background: #FFF; color: var(--ink); border: 1px solid var(--border); }
.rec-tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.5px;
  color: #FFF; background: #0A0A0A; border-radius: var(--radius-full);
  padding: 2px 9px; margin-bottom: 2px; align-self: flex-start;
}

/* ─── Sections ──────────────────────────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 34px 0 12px;
}
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.section-head a { font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }

.post-card {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 10px; background: #FFF;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: border-color 0.12s ease;
}
.post-card:hover { border-color: #BDBDBD; }
.post-card img.cover { width: 74px; height: 74px; object-fit: cover; border-radius: 12px; flex: none; background: var(--subtle); }
.post-card .info { flex: 1; min-width: 0; }
.post-card .name { font-weight: 700; font-size: 15px; }
.post-card .meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.post-card .excerpt { color: var(--ink-secondary); font-size: 13.5px; margin-top: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  background: var(--subtle); border: 1px solid var(--border); color: var(--ink-secondary);
}
.pill.release { background: #F0F9FF; color: #0369A1; border-color: rgba(3,105,161,0.25); }
.pill.guide { background: #F0FDF4; color: #15803D; border-color: rgba(21,128,61,0.25); }

/* ─── Article / doc / page body ─────────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 4px; }
.crumbs a { color: var(--ink-secondary); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--ink); }
.article { padding: 14px 0 30px; max-width: 720px; }
.article h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 6px; }
.article .a-meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.article .a-cover { width: 100%; border-radius: var(--radius); margin-bottom: 20px; }
.rich { font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.rich h2 { font-size: 21px; margin: 22px 0 8px; letter-spacing: -0.3px; }
.rich h3 { font-size: 17px; margin: 18px 0 6px; }
.rich p { margin: 10px 0; }
.rich a { color: var(--accent); }
.rich blockquote { border-left: 3px solid var(--border); padding-left: 16px; color: var(--ink-secondary); margin: 14px 0; }
.rich ul, .rich ol { padding-left: 24px; margin: 10px 0; }
.rich pre, .rich code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--subtle); border-radius: 6px; }
.rich code { padding: 2px 7px; font-size: 13.5px; }
.rich pre { padding: 14px 16px; overflow-x: auto; font-size: 13.5px; border: 1px solid var(--border); border-radius: 12px; }
.rich pre code { padding: 0; background: none; }
.rich img { max-width: 100%; border-radius: 12px; }
.rich hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.rich table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.rich td, .rich th { border: 1px solid var(--border); padding: 8px 12px; font-size: 14px; text-align: left; }

/* ─── Docs browser ──────────────────────────────────────────────────────── */
.ver-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.ver-btn {
  border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 7px 16px; font-size: 13px; font-weight: 700;
  background: #FFF; color: var(--ink-secondary); cursor: pointer; font-family: inherit;
  text-decoration: none;
}
.ver-btn.on { background: #0A0A0A; color: #FFF; border-color: #0A0A0A; }
.doc-link {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px;
  margin-bottom: 8px; text-decoration: none; color: var(--ink); font-weight: 600;
  font-size: 14.5px; background: #FFF; transition: border-color 0.12s ease;
}
.doc-link:hover { border-color: #BDBDBD; }
.doc-link .chev { margin-left: auto; color: var(--muted); }

.empty {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--muted); font-size: 14px;
}
.icon { display: inline-flex; vertical-align: -4px; }
.icon svg { display: block; }
