/* Shared design for Creativity SaaS Hub and its apps: quiet, precise tool. Neutral surfaces, one accent (Galaxy gold) per view, sentence case,
   tabular numbers, no decorative motion. Rules follow ui-skills baseline-ui and fixing-accessibility. */
:root {
  --page: #fafaf9; --surface: #ffffff; --subtle: #f4f4f2; --strong: #ebebe8; --inverse: #161616; --on-inverse: #ffffff;
  --ink: #161616; --ink-2: #5c5c58; --muted: #6f6f6a; --line: #e6e6e2;
  --accent: #9a6a1c; --accent-soft: #f6eedf; --accent-ink: #6e4a10;
  --ok: #1f7a4a; --bad: #b42318; --run: #2a5cb8;
  --ig: #b1336f; --fb: #2a5cb8; --tt: #161616; --yt: #b42318;
  --sans: "Inter", system-ui, sans-serif; --serif: "Fraunces", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --shadow: 0 1px 2px rgb(16 16 16 / .05);
  --z-menu: 10; --z-dialog: 20;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #0f0f0e; --surface: #171716; --subtle: #1e1e1c; --strong: #282826; --inverse: #f2f2ef; --on-inverse: #121211;
    --ink: #f2f2ef; --ink-2: #b4b4ae; --muted: #9a9a94; --line: #2b2b28;
    --accent: #e0ad55; --accent-soft: #2d2412; --accent-ink: #f0c77c;
    --ok: #5cc48c; --bad: #f08a80; --run: #8db0f2; --ig: #e57fae; --fb: #8db0f2; --tt: #f2f2ef; --yt: #f08a80; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 400 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; } p { text-wrap: pretty; }
[hidden] { display: none !important; }
.mono, .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--inverse); width: 16px; height: 16px; }


/* Shared components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; }
.field > span, legend { font-size: 13px; color: var(--ink-2); padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
select, input[type=number], input[type=text], input[type=url], input[type=email], input[type=password], input[type=date] { font: 400 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); height: 36px; padding: 0 10px; min-width: 0; }
input[type=number] { width: 84px; }
.hint { font-size: 13px; color: var(--muted); }
button, a.btn, summary.btn { font: 500 14px var(--sans); height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--inverse); background: var(--inverse); color: var(--on-inverse); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button.gold { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost, a.btn.ghost, summary.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
button.ghost:hover, a.btn.ghost:hover, summary.btn.ghost:hover { background: var(--subtle); }
button:disabled { opacity: .45; cursor: not-allowed; }
.linkish { height: auto; padding: 0; border: 0; background: none; color: var(--ink); font: 500 13px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.msg { font-size: 13px; color: var(--ink-2); min-height: 1.2em; margin: 0; }
.msg.err, .err { color: var(--bad); font-size: 13px; white-space: pre-wrap; }
.empty { color: var(--ink-2); padding: 28px 12px; display: grid; gap: 12px; justify-items: center; text-align: center; margin: 0; }
.tag { flex: none; font: 500 12px/1 var(--sans); padding: 4px 8px; border-radius: 999px; }
.tag.galaxy { background: var(--accent-soft); color: var(--accent-ink); } .tag.competitor { background: var(--subtle); color: var(--ink-2); }
.tag.influencer { background: var(--subtle); color: var(--run); }
dialog { z-index: var(--z-dialog); border: 0; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 24px 64px rgb(0 0 0 / .25); }
dialog::backdrop { background: rgb(10 10 10 / .5); }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.view-head h1 { margin: 0; font: 600 28px/1.2 var(--serif); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline .field { flex: 1 1 200px; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.skill { padding: 18px; display: grid; gap: 10px; align-content: start; }
.skill h2 { margin: 0; font: 600 15px var(--mono); }
.skill p { margin: 0; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.files { display: flex; flex-wrap: wrap; gap: 4px; }
.files a { font: 12px var(--mono); color: var(--ink-2); background: var(--subtle); padding: 4px 8px; border-radius: 6px; text-decoration: none; }
.files a:hover { color: var(--ink); background: var(--strong); }
