/* Neumorphic theme: one very light color, elements shaped by a light (top-left) and a dark (bottom-right) shadow.
   Palette: #EFF2F9 · #E4EBF1 · #B5BFC6 · #6E7F8D — shadows #FAFBFF 100% / #161B1D 23%.
   Text colors are darker shades of #6E7F8D so they stay readable (WCAG AA). */
:root {
  --bg: #EFF2F9;
  --surface: #EFF2F9;          /* raised elements share the background color — shadows do the rest */
  --surface-2: #E4EBF1;        /* wells, tracks, pressed states */
  --line: #B5BFC6;             /* dividers */
  --border: rgba(110, 127, 141, .16);
  --text: #2F3B45;
  --text-2: #4F5E6A;
  --text-3: #5F6C77;
  --accent: #56687A;           /* #6E7F8D, darkened so white text on buttons stays readable */
  --accent-hover: #465767;
  --accent-soft: #E4EBF1;
  --icon: #6E7F8D;
  --top: #7A5A16;      --top-soft: #F1E9DA;
  --pro: #35635A;      --pro-soft: #E0ECE9;
  --rising: #5A5090;   --rising-soft: #E8E6F3;
  --awarded: #3A5A86;  --awarded-soft: #E1E8F3;

  --light: #FAFBFF;
  --dark: rgba(22, 27, 29, .23);
  --neu-1: -5px -5px 10px var(--light), 5px 5px 10px var(--dark);
  --neu-2: -10px -10px 20px var(--light), 10px 10px 20px var(--dark);
  --neu-3: -20px -20px 40px var(--light), 20px 20px 40px var(--dark);
  --neu-in: inset -5px -5px 10px var(--light), inset 5px 5px 10px var(--dark);
  --neu-in-soft: inset -3px -3px 6px var(--light), inset 3px 3px 6px rgba(22, 27, 29, .16);
  --shadow: var(--neu-2);

  --radius: 18px;
  /* Campton (headings) and Avenir Next (text) are licensed fonts: they're used when installed
     (Avenir Next ships with macOS/iOS), otherwise the closest system fonts take over. */
  --font-heading: "Campton", "Avenir Next", "Avenir", "Segoe UI", system-ui, sans-serif;
  --font: "Avenir Next", "Avenir", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-heading); font-weight: 400; letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--icon); outline-offset: 3px; }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
  border-radius: 12px; border: 0; background: var(--surface); box-shadow: var(--neu-1); cursor: pointer; font-weight: 600;
  color: var(--text-2); white-space: nowrap; transition: box-shadow .15s, color .15s; }
.btn:hover { color: var(--text); }
.btn:active { box-shadow: var(--neu-in); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: -5px -5px 10px var(--light), 5px 5px 12px rgba(22, 27, 29, .3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

.input, .select { height: 40px; width: 100%; padding: 0 14px; border: 0; border-radius: 12px; background: var(--surface);
  box-shadow: var(--neu-in-soft); color: var(--text); }
.input::placeholder { color: var(--text-3); opacity: .8; }
.input:focus, .select:focus { outline: none; box-shadow: var(--neu-in), 0 0 0 2px var(--line); }
label.field, div.field { display: grid; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-top { background: var(--top-soft); color: var(--top); }
.badge-pro { background: var(--pro-soft); color: var(--pro); }
.badge-rising { background: var(--rising-soft); color: var(--rising); }
.badge-awarded { background: var(--awarded-soft); color: var(--awarded); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.source-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 500;
  box-shadow: var(--neu-in-soft); color: var(--text-2); }
a.source-chip:hover { color: var(--text); }
.awards { font-size: 13px; color: var(--text-2); }
.awards b { color: var(--text); font-variant-numeric: tabular-nums; }
.facts { font-size: 12.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }

.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); box-shadow: 0 8px 18px -12px var(--dark); }
.topbar-inner { max-width: 1240px; margin: 0 auto; height: 66px; padding: 0 20px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 34px; width: auto; }
.topbar nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.topbar nav a.link { color: var(--text-2); }
.topbar nav a.link:hover { color: var(--text); }

/* ---------- designer card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; object-fit: cover; }
.card-id { min-width: 0; flex: 1; }
.card-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { flex: none; text-align: center; }
.score-num { font-size: 22px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 12px; box-shadow: var(--neu-in-soft); }
.metric { padding: 8px 10px; }
.metric + .metric { border-left: 1px solid var(--border); }
.score-num, .card-name { font-family: var(--font-heading); }
.metric b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.metric span { font-size: 12px; color: var(--text-3); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.project { aspect-ratio: 4 / 3; border-radius: 6px; background: var(--surface-2) center / cover; position: relative; overflow: hidden; }
.project span { position: absolute; inset: auto 0 0 0; padding: 14px 6px 4px; font-size: 10.5px; line-height: 1.2; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-preview { position: relative; display: block; aspect-ratio: 1.91 / 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.site-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-preview span { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: rgba(0, 0, 0, .65); color: #fff; }
.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.project-list li { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.project-list a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-list a:hover { color: var(--accent); text-decoration: underline; }
.project-list span { flex: none; color: var(--text-3); font-size: 12px; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { flex: 1; }

.breakdown { display: grid; gap: 4px; }
.bd-row { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.bd-bar { height: 6px; border-radius: 3px; background: var(--surface); box-shadow: var(--neu-in-soft); overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: var(--icon); border-radius: 3px; }
.bd-row em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-3); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(47, 59, 69, .35); backdrop-filter: blur(3px); display: none; place-items: center; z-index: 50; padding: 16px; }
.modal.open { display: grid; }
.modal-box { background: var(--surface); border: 0; box-shadow: 0 24px 60px rgba(22, 27, 29, .22); border-radius: 22px; width: 100%; max-width: 420px; padding: 24px; display: grid; gap: 16px; }
.modal-box h3 { font-size: 20px; }

@media (max-width: 640px) {
  .topbar nav a.link { display: none; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------- legal pages (terms, privacy policy) ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 48px 20px 64px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 600; margin-bottom: 8px; }
.legal .meta { margin: 0 0 24px; color: var(--text-3); font-size: 13px; }
.legal h2 { font-size: 21px; font-weight: 600; margin: 42px 0 12px; scroll-margin-top: 84px; }
.legal h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; font-family: var(--font-heading); }
.legal p, .legal li { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.legal p { margin: 0 0 12px; }
.legal ul, .legal ol { margin: 0 0 14px; padding-left: 1.3em; display: grid; gap: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.legal-box { background: var(--surface); border-radius: 20px; box-shadow: var(--neu-in-soft); padding: 18px 22px; margin: 0 0 24px; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.legal-toc { background: var(--surface); border-radius: 22px; box-shadow: var(--neu-2); padding: 20px 28px; margin: 0 0 8px; }
.legal-toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; }
.legal-toc li { font-size: 14px; break-inside: avoid; }
.legal-toc a { color: var(--text-2); text-decoration: none; }
.legal-toc a:hover { color: var(--text); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 14px; }
.legal th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal td { padding: 10px; vertical-align: top; color: var(--text-2); border-bottom: 1px solid rgba(181, 191, 198, .45); }
.legal-dl { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 10px 22px; margin: 0 0 16px; padding: 18px 22px; border-radius: 20px; box-shadow: var(--neu-in-soft); }
.legal-dl dt { font-size: 13px; font-weight: 600; color: var(--text-3); }
.legal-dl dd { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
@media (max-width: 640px) { .legal-dl { grid-template-columns: 1fr; gap: 2px; } .legal-dl dd { margin-bottom: 10px; } }
/* Placeholders to fill in before launch (grep "class=\"todo\"") */
mark.todo { background: #FBEFC9; color: #6B4E00; padding: 1px 6px; border-radius: 6px; font-weight: 600; font-size: .92em; }
.site-footer { border-top: 1px solid rgba(181, 191, 198, .5); padding: 28px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--text); }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } .legal table { display: block; overflow-x: auto; } }

/* ---------- language switch of the legal pages ---------- */
