/*! Nixosoft-AI-Designs 1.0.1 — full theme. https://cdn.nixosoft.com/nixosoft-ai-designs/1.0.1/ · design-systems/nixosoft-ai-designs */
/* Nixosoft-AI-Designs — tokens.
   Warm sand paper and charcoal, one sage accent, soft depth, sans throughout.
   Every colour a product uses lives in these blocks; components.css and the
   product's own CSS use the tokens only (checks/design-check.mjs enforces it).

   Theme: light by default; dark from the system (prefers-color-scheme), or
   forced either way with <html data-theme="light|dark"> (a Light / Dark /
   Same as system choice). A desktop app that sets the OS theme source (Electron
   nativeTheme.themeSource) can rely on prefers-color-scheme alone.

   A product adds its own semantic tokens (e.g. --remind) to BOTH blocks.

   Fonts: self-host Vazirmatn (variable woff2) and Inter (variable woff2) and
   point the two @font-face src lines at your copies. */

@font-face {
  /* Vazirmatn for Arabic script only: it stays first in every stack
     (NX-LG-020) while Latin text falls through to Inter. Vazirmatn's own Latin
     sits ~0.14em high in its line, which puts English labels off-centre
     beside their icons. */
  font-family: 'Vazirmatn Script';
  src: url('fonts/vazirmatn-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Inter Variable';
  src: url('fonts/inter-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Paper */
  --bg: #F5F1E9;
  --surface: #FCFAF6;
  --surface-2: #ECE6DA;
  --line: #DDD5C6;
  /* Ink */
  --text: #2A2823;
  --muted: #6A665B;
  /* The one accent: sage */
  --accent: #5C7349;
  --accent-hover: #4B5F3A;
  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  /* States (never used as decoration) */
  --danger: #B3402E;
  --ok: #2F7A64;
  --info: #3D6AA3;
  --warn: #9A6206;
  /* Media stage: video, screen shares, pictures — dark in both themes */
  --stage: #1F1D1A;
  --stage-panel: #2A2724;
  --over: rgb(31 29 26 / 0.82);
  --over-text: #F4F0E8;
  /* Depth */
  --scrim: rgb(41 38 31 / 0.45);
  --shadow: 0 1px 2px rgb(41 38 31 / 0.05), 0 6px 20px rgb(41 38 31 / 0.06);
  --shadow-lift: 0 2px 6px rgb(41 38 31 / 0.08), 0 14px 36px rgb(41 38 31 / 0.12);
  /* Shape */
  --radius: 14px;          /* cards, dialogs, panels */
  --radius-group: 12px;    /* groups, list items, toasts, segmented tracks */
  --radius-control: 6px;   /* everything you press or type into: softly squared, never pills */
  /* Space (4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  /* Type */
  --font: 'Vazirmatn Script', 'Inter Variable', 'Inter', system-ui, sans-serif;
  --font-title: 'Vazirmatn Script', 'Inter Variable', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --weight-title: 650;
  --tracking-title: -0.02em;
  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .15s;
  --t-fade: .25s;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1D1A;
    --surface: #242522;
    --surface-2: #2E2F2A;
    --line: #3B3C36;
    --text: #EEECE4;
    --muted: #A7A498;
    --accent: #A8BE8E;
    --accent-hover: #BACFA1;
    --accent-ink: #1C1D1A;
    --danger: #E5654F;
    --ok: #66C3A4;
    --info: #7FA6D6;
    --warn: #E3B05A;
    --stage: #121110;
    --stage-panel: #1C1B19;
    --over: rgb(18 17 16 / 0.82);
    --over-text: #F0ECE4;
    --scrim: rgb(0 0 0 / 0.55);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 6px 20px rgb(0 0 0 / 0.25);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 0.3), 0 14px 36px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

/* The same dark values, forced by a Dark choice. Keep the two dark blocks identical. */
:root[data-theme="dark"] {
  --bg: #1C1D1A;
  --surface: #242522;
  --surface-2: #2E2F2A;
  --line: #3B3C36;
  --text: #EEECE4;
  --muted: #A7A498;
  --accent: #A8BE8E;
  --accent-hover: #BACFA1;
  --accent-ink: #1C1D1A;
  --danger: #E5654F;
  --ok: #66C3A4;
  --info: #7FA6D6;
  --warn: #E3B05A;
  --stage: #121110;
  --stage-panel: #1C1B19;
  --over: rgb(18 17 16 / 0.82);
  --over-text: #F0ECE4;
  --scrim: rgb(0 0 0 / 0.55);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 6px 20px rgb(0 0 0 / 0.25);
  --shadow-lift: 0 2px 6px rgb(0 0 0 / 0.3), 0 14px 36px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

/* Nixosoft-AI-Designs — components.
   Tokens only (tokens.css): no literal colour anywhere in this file.
   Logical properties only (NX-LG-010), so every piece works right to left.
   The class names are the system's vocabulary: use them as they are, or keep
   the declarations and rename to the product's own words. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);          /* app; a website uses 17px/1.6 (.site) */
  -webkit-font-smoothing: antialiased;
}
body.site { font: 17px/1.6 var(--font); }
[hidden] { display: none !important; }

/* ── Type ──────────────────────────────────────────────────────────────── */
h1, h2, h3, .title { font-family: var(--font-title); font-weight: var(--weight-title); letter-spacing: var(--tracking-title); line-height: 1.2; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
.lead { font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
/* Panel and section labels: small, bold, spaced — never shouted in colour. */
.label { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* What an area holds, in one quiet line under its name. */
.about { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
.material-symbols-rounded { font-size: 20px; line-height: 1; vertical-align: middle; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
button, select, input, textarea { font: inherit; color: inherit; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink);
  /* Transparent hairline, not none: every variant (ghost, danger) then has
     the same height, so buttons side by side line up exactly. */
  border: 1px solid transparent; border-radius: var(--radius-control);
  padding-block: 8px; padding-inline: 16px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
button:hover, .btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
/* Second choice: paper with a hairline, the accent on hover. */
button.ghost, .btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
button.ghost:hover, .btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
/* An icon alone: name it with aria-label and title. */
button.icon, .btn.icon { background: transparent; color: var(--muted); padding: 6px; }
button.icon:hover, .btn.icon:hover { color: var(--accent); background: var(--surface-2); }
button.danger, .btn.danger { background: var(--surface); color: var(--danger); border: 1px solid var(--danger); }
button.danger:hover, .btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-weight: 600; display: inline; }
button.link:hover { background: none; color: var(--accent-hover); }
.btn-lg { padding-block: 12px; padding-inline: 22px; font-size: 15px; box-shadow: var(--shadow); }
/* A button that would wrap its words beside a heading becomes an icon. */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* An icon button in a row of text buttons is a square of the same height
   (one line + padding + hairline), so the row reads as one size. */
.actions > .icon { inline-size: calc(1lh + 18px); block-size: calc(1lh + 18px); padding: 0; }

/* ── Fields ────────────────────────────────────────────────────────────── */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea, select {
  inline-size: 100%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-control);
  padding-block: 9px; padding-inline: 12px;
}
textarea { resize: vertical; }
/* Native lists follow the theme (NX-FE-006). */
select option { background: var(--surface); color: var(--text); }
input:focus, textarea:focus, select:focus, button:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-block: 12px; }
.field > span { color: var(--muted); font-size: 13px; }

/* Switch: round on purpose (a switch is not a button). */
input.toggle { appearance: none; inline-size: 36px; block-size: 20px; margin: 0; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background var(--t-fast); }
input.toggle::after { content: ''; position: absolute; inset-block-start: 2px; inset-inline-start: 2px; inline-size: 16px; block-size: 16px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); transition: inset-inline-start var(--t-fast); }
input.toggle:checked { background: var(--accent); }
input.toggle:checked::after { inset-inline-start: 18px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

/* Segmented choice (Light / Dark / Same as system). */
.seg-choice { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-group); background: var(--surface-2); }
.seg-choice button { background: transparent; color: var(--muted); border-radius: var(--radius-control); padding-block: 6px; padding-inline: 12px; font-weight: 500; }
.seg-choice button:hover { background: var(--surface); color: var(--text); }
.seg-choice button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

/* Chips: one-click requests and filters. */
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-control); padding-block: 4px; padding-inline: 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--accent); background: var(--surface); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ── Containers ────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h2 { font-size: 19px; }
.group { background: var(--surface); border-radius: var(--radius-group); box-shadow: var(--shadow); padding-block: 12px; padding-inline: 14px; }
/* A choice you pick by its card: lifts on hover; the default is ringed. */
.choice-card { display: grid; gap: 6px; justify-content: stretch; justify-items: start; text-align: start; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.choice-card:hover { background: var(--surface); color: var(--text); border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.choice-card.default { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-card strong { font-family: var(--font-title); font-size: 17px; font-weight: var(--weight-title); }
/* An icon in a soft accent tile (choice cards, list rows). */
.icon-tile { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: var(--radius-group); background: var(--accent-soft); color: var(--accent); }
.icon-tile.round { inline-size: 34px; block-size: 34px; border-radius: 50%; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list > li { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-group); padding: 12px; box-shadow: var(--shadow); transition: box-shadow var(--t-fast), border-color var(--t-fast); }
.list > li:hover, .list > li.active { box-shadow: var(--shadow-lift); }
.list > li.active { border-color: var(--accent); }
.list > li.empty { box-shadow: none; background: var(--surface-2); border: 1px dashed var(--line); }
/* A row of something you turn on: picture, sentence, switch. */
.row-option { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-group); background: var(--bg); border: 1px solid var(--line); cursor: pointer; }
.row-option .text { display: grid; flex: 1; min-inline-size: 0; line-height: 1.3; }
.row-option small { color: var(--muted); font-size: 12px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { color: var(--text); margin-block-end: 6px; }

/* ── Navigation ────────────────────────────────────────────────────────── */
/* Quiet until chosen: muted text; hover is a surface-2 well; the open one is accent on accent-soft. */
.nav { display: flex; gap: 4px; }
.nav a, .tabs a { display: flex; align-items: center; gap: 8px; padding-block: 7px; padding-inline: 14px; border-radius: var(--radius-control); color: var(--muted); text-decoration: none; }
.nav a:hover, .tabs a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active, .tabs a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tabs { display: grid; align-content: start; gap: 2px; padding-block: 20px; padding-inline: 14px; background: var(--bg); }
/* A page with unsaved changes carries a dot on its tab. */
.tabs a.dirty::after { content: ''; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--accent); margin-inline-start: auto; }
/* A page's header stays at the top while it scrolls: its title, its state, Save. */
.page-head { position: sticky; inset-block-start: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding-block: 18px 14px; background: var(--bg); border-block-end: 1px solid var(--line); }
.page-head h2 { flex: 1; min-inline-size: 0; }
.page-head .save-state { color: var(--muted); font-size: 13px; white-space: nowrap; }
.page-head.dirty .save-state { color: var(--accent); font-weight: 600; }
.page-head:not(.dirty) .save { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* Top bar (app) — in a frameless desktop window it is also the title bar. */
.topbar { display: flex; align-items: center; gap: 16px; min-block-size: 54px; padding-block: 10px; padding-inline: 16px 8px; background: var(--bg); border-block-end: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { display: block; inline-size: 30px; block-size: 30px; }
.brand-name { font-family: var(--font-title); font-weight: var(--weight-title); letter-spacing: var(--tracking-title); font-size: 20px; }
.win-controls { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; padding-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.win-btn { inline-size: 42px; block-size: 34px; padding: 0; background: transparent; color: var(--muted); border-radius: var(--radius-control); font-weight: 400; }
.win-btn:hover { background: var(--surface-2); color: var(--text); }
.win-btn.close:hover { background: var(--danger); color: var(--accent-ink); }

/* Site header (website): sticky, translucent paper with a blur. */
.site-header { position: sticky; inset-block-start: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-block-end: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.wrap { max-inline-size: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

/* ── Feedback ──────────────────────────────────────────────────────────── */
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-group); box-shadow: var(--shadow-lift); padding-block: 10px; padding-inline: 14px; }
/* A bar under the top bar: something needs the person (sign in, upgrade, a warning). */
.notice { display: flex; align-items: center; gap: 10px; padding-block: 8px; padding-inline: 16px; background: var(--accent-soft); border-block-end: 1px solid var(--accent); }
.notice > .grow { flex: 1; }
.notice .material-symbols-rounded { color: var(--accent); }
.notice.danger { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: var(--danger); }
.notice.danger .material-symbols-rounded { color: var(--danger); }
.status { color: var(--muted); }
.status[data-state="error"] { color: var(--danger); }
.status[data-state="ok"] { color: var(--ok); }
/* A dot that says how it is going. */
.dot { display: inline-block; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--line); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.danger { background: var(--danger); }
/* A meter (allowance used, progress). */
.meter { block-size: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; block-size: 100%; inline-size: 0; background: var(--ok); border-radius: inherit; transition: inline-size .3s var(--ease); }
.meter[data-state="low"] > span { background: var(--warn); }
.meter[data-state="out"] > span { background: var(--danger); }

/* Dialog: paper card over a soft scrim. */
dialog.modal { inline-size: min(560px, calc(100vw - 32px)); max-block-size: calc(100vh - 48px); overflow: auto; padding-block: 26px 22px; padding-inline: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift); }
dialog.modal::backdrop { background: var(--scrim); }
dialog.modal h2 { margin-block: 6px 8px; font-size: 24px; line-height: 1.25; }
dialog.modal p { margin: 0; color: var(--muted); line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-block-start: 18px; }

/* ── Empty screens: a line drawing, a human sentence, what to do next ─── */
.empty-state { display: flex; align-items: center; gap: 24px; padding-block: 18px; padding-inline: 22px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line); }
.empty-state .art { inline-size: 168px; flex: none; }
.empty-state h2 { margin-block-end: 4px; font-size: 22px; }
.empty-state p { margin: 0; color: var(--muted); }
/* Line drawings: inline SVG, coloured only by these classes, so they follow the theme. */
.art { display: block; inline-size: 100%; block-size: auto; }
.art .ink { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art .faint { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art .paper { fill: var(--surface); }
.art .tint { fill: var(--accent-soft); }
.art .acc { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.art .acc-fill { fill: var(--accent); }
.art .dash { stroke-dasharray: 2 7; }

/* ── Media stage: pictures and video sit on a dark stage in both themes ── */
.stage { background: var(--stage); color: var(--over-text); border-radius: var(--radius); overflow: hidden; }
.stage .over { background: var(--over); color: var(--over-text); border-radius: var(--radius-group); }

/* ── Motion ────────────────────────────────────────────────────────────── */
@keyframes nad-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes nad-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: nad-fade-in var(--t-fade) var(--ease); }
  .pulse { animation: nad-pulse 1.6s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .choice-card:hover { transform: none; }
}
