/* smallcord.css — self-contained brand for smallcord.com.
 * Own aesthetic (Discord-adjacent, dark-first). No external fonts/CDN/scripts.
 * Light is the default palette; dark is applied via prefers-color-scheme AND a
 * manual [data-theme] override so both render legibly. System font stack only. */

:root {
  color-scheme: light dark;

  /* brand — our own indigo/violet, not Discord's blurple */
  --brand: #5b4be0;
  --brand-strong: #4635c9;
  --brand-ink: #ffffff;

  /* light palette (default) */
  --bg: #f4f5fb;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f1f9;
  --border: #d9dbe9;
  --border-strong: #c3c6dc;
  --text: #1b1d2b;
  --text-dim: #5a5e78;
  --text-faint: #868aa6;
  --ok: #2a8a4a;
  --ok-bg: #e5f5ea;
  --warn: #b23b3b;
  --warn-bg: #fbe8e8;
  --accent-soft: rgba(91, 75, 224, 0.10);
  --shadow: 0 1px 2px rgba(20, 22, 40, .06), 0 8px 30px rgba(20, 22, 40, .08);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1080px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* dark-first: applies when the OS asks for dark ... */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1017;
    --bg-elev: #171923;
    --panel: #191b26;
    --panel-2: #20222f;
    --border: #2b2e3e;
    --border-strong: #3a3e52;
    --text: #eceefb;
    --text-dim: #a7abc4;
    --text-faint: #767b96;
    --brand: #7c6cff;
    --brand-strong: #6a58ff;
    --ok: #4fd07d;
    --ok-bg: rgba(79, 208, 125, .12);
    --warn: #ff7a7a;
    --warn-bg: rgba(255, 122, 122, .12);
    --accent-soft: rgba(124, 108, 255, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 40px rgba(0, 0, 0, .45);
  }
}
/* ... and when a visitor forces a theme via the toggle */
:root[data-theme="dark"] {
  --bg: #0f1017; --bg-elev: #171923; --panel: #191b26; --panel-2: #20222f;
  --border: #2b2e3e; --border-strong: #3a3e52; --text: #eceefb; --text-dim: #a7abc4;
  --text-faint: #767b96; --brand: #7c6cff; --brand-strong: #6a58ff;
  --ok: #4fd07d; --ok-bg: rgba(79,208,125,.12); --warn: #ff7a7a; --warn-bg: rgba(255,122,122,.12);
  --accent-soft: rgba(124,108,255,0.14);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 40px rgba(0,0,0,.45);
}
:root[data-theme="light"] {
  --bg: #f4f5fb; --bg-elev: #ffffff; --panel: #ffffff; --panel-2: #f0f1f9;
  --border: #d9dbe9; --border-strong: #c3c6dc; --text: #1b1d2b; --text-dim: #5a5e78;
  --text-faint: #868aa6; --brand: #5b4be0; --brand-strong: #4635c9;
  --ok: #2a8a4a; --ok-bg: #e5f5ea; --warn: #b23b3b; --warn-bg: #fbe8e8;
  --accent-soft: rgba(91,75,224,0.10);
  --shadow: 0 1px 2px rgba(20,22,40,.06), 0 8px 30px rgba(20,22,40,.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- header ------------------------------------------------------------ */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: var(--shadow);
}
.brand .name { font-size: 19px; letter-spacing: -.01em; }
.brand .name b { color: var(--brand); }
.theme-toggle {
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-dim);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--text); }

/* ---- hero -------------------------------------------------------------- */
.hero { padding: 8px 0 6px; text-align: center; }
.hero h1 {
  font-size: clamp(26px, 5.2vw, 42px); line-height: 1.1; margin: 6px 0 8px;
  letter-spacing: -.02em;
}
.hero h1 .accent { color: var(--brand); }
.hero .sub { color: var(--text-dim); font-size: clamp(15px, 2.2vw, 18px); margin: 0 auto; max-width: 40ch; }

/* ---- tool card --------------------------------------------------------- */
.tool {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin: 16px auto 8px; max-width: 720px;
}

/* tier picker (segmented) */
.tiers { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.tiers-label { font-size: 13px; font-weight: 600; color: var(--text-dim); display: flex; justify-content: space-between; align-items: baseline; }
.tiers-label a { font-weight: 500; font-size: 12px; }
.tier-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier {
  position: relative; border: 1px solid var(--border-strong); background: var(--panel-2);
  border-radius: var(--radius-sm); padding: 10px 8px; cursor: pointer; text-align: center;
  transition: border-color .12s, background .12s;
}
.tier input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.tier .t-name { font-weight: 700; font-size: 13px; display: block; }
.tier .t-size { font-size: 12px; color: var(--text-dim); }
.tier:hover { border-color: var(--brand); }
.tier:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.tier:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* drop zone */
.drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--panel-2); padding: 30px 20px; text-align: center; cursor: pointer;
  transition: border-color .12s, background .12s; display: block;
}
.drop:hover, .drop.drag { border-color: var(--brand); background: var(--accent-soft); }
.drop:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.drop .icon { font-size: 30px; line-height: 1; }
.drop .big { font-size: 17px; font-weight: 700; margin: 8px 0 2px; }
.drop .small { color: var(--text-dim); font-size: 13.5px; }
.drop input[type=file] { display: none; }

/* readout / status */
.readout { margin-top: 14px; }
.status {
  border-radius: var(--radius-sm); padding: 13px 15px; font-size: 14.5px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text-dim);
}
.status.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--text); }
.status.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--text); }
.status .filename { font-family: var(--mono); font-weight: 600; word-break: break-all; color: var(--text); }
.status .verdict { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.status .verdict.fits { color: var(--ok); }
.status .verdict.over { color: var(--warn); }
.status .detail { display: block; margin-top: 4px; font-size: 13.5px; }
.status .next { display: block; margin-top: 7px; font-size: 12.5px; color: var(--text-faint); }
.bar { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 9px 0 2px; }
.bar > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .2s; }
.bar.over > span { background: var(--warn); }
.actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.btn:hover { border-color: var(--brand); }
.btn.ghost { background: transparent; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff; border-color: transparent; font-weight: 700; text-decoration: none;
  display: inline-block;
}
.btn.primary:hover { filter: brightness(1.06); border-color: transparent; color: #fff; }

/* drop-router: where an over-limit file gets sent to be shrunk */
.route-cta, .unsupported {
  margin-top: 12px; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--panel);
}
.route-cta { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: var(--accent-soft); }
.route-head { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.route-head b { color: var(--brand); }
.route-icon { font-size: 20px; line-height: 1; flex: none; }
.route-blurb { margin: 7px 0 11px; font-size: 13.5px; color: var(--text-dim); }
.route-go { margin-bottom: 8px; }
.route-note { display: block; font-size: 12px; color: var(--text-faint); }
.support-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-dim); }
.support-list li { margin: 3px 0; }
.support-list a { font-weight: 600; }

/* trust line */
.trust {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 12px auto 0; max-width: 720px; text-align: center;
  font-size: 13.5px; color: var(--text-dim);
}
.trust .lock { color: var(--ok); }
.trust b { color: var(--text); font-weight: 600; }

/* ---- sections ---------------------------------------------------------- */
.section { max-width: 760px; margin: 40px auto 0; }
.section h2 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.step .num { width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: 14px; margin-bottom: 8px; }
.step h3 { margin: 0 0 4px; font-size: 15px; }
.step p { margin: 0; color: var(--text-dim); font-size: 13.5px; }

.faq details {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel);
  padding: 4px 16px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 11px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 12px; color: var(--text-dim); font-size: 14.5px; }

/* ---- footer ------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--border); margin-top: 48px; padding: 22px 0 34px; color: var(--text-faint); font-size: 13.5px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.foot-inner nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-inner nav a { color: var(--text-dim); text-decoration: none; }
.foot-inner nav a:hover { color: var(--brand); }
.foot-note { width: 100%; margin-top: 10px; color: var(--text-faint); font-size: 12.5px; }

/* legal / reading pages */
.doc { max-width: 680px; margin: 8px auto 0; }
.doc h1 { font-size: 30px; letter-spacing: -.02em; }
.doc h2 { font-size: 19px; margin-top: 28px; }
.doc p, .doc li { color: var(--text-dim); }
.doc .updated { color: var(--text-faint); font-size: 13px; }
.doc .lede { color: var(--text); font-size: 17px; }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 27px; }
  .tool { padding: 15px; }
  .drop { padding: 24px 14px; }
  .site-head { padding-top: 12px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
