/* SystemIA360 panel — own design tokens, no external resources. */

:root {
  color-scheme: light dark;
  --s360-bg: #f6f7f9;
  --s360-surface: #ffffff;
  --s360-text: #14171c;
  --s360-muted: #4a5260;
  --s360-line: #dfe3ea;
  --s360-accent: #0b5cad;
  --s360-accent-text: #ffffff;
  --s360-ok: #157f3b;
  --s360-focus: #f0a400;
  --s360-radius: 14px;
  --s360-space: clamp(1rem, 2.5vw, 1.5rem);
  --s360-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --s360-bg: #0e1116;
    --s360-surface: #161b22;
    --s360-text: #e8ecf2;
    --s360-muted: #a9b2c0;
    --s360-line: #2a313c;
    --s360-accent: #5aa7f2;
    --s360-accent-text: #0b1520;
    --s360-ok: #4cc77a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--s360-bg);
  color: var(--s360-text);
  font: 1rem/1.6 var(--s360-font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--s360-accent); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--s360-focus); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--s360-surface); }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

.bar {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center;
  padding: .9rem var(--s360-space);
  background: var(--s360-surface);
  border-bottom: 1px solid var(--s360-line);
}
.brand { display: inline-flex; gap: .6rem; align-items: center; font-weight: 700; color: var(--s360-text); text-decoration: none; letter-spacing: .01em; }
.brand-mark {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--s360-accent), var(--s360-ok), var(--s360-accent));
  box-shadow: inset 0 0 0 .35rem var(--s360-surface);
  border: 2px solid var(--s360-accent);
}
.nav { display: flex; gap: 1.25rem; flex: 1; }
.nav a, .langs a { color: var(--s360-muted); text-decoration: none; }
.nav a:hover, .langs a:hover { color: var(--s360-text); }
.langs { display: flex; gap: .4rem; flex-wrap: wrap; }
.langs a { padding: .2rem .65rem; border: 1px solid var(--s360-line); border-radius: 999px; font-size: .875rem; }
.langs a[aria-current="true"] { color: var(--s360-accent-text); background: var(--s360-accent); border-color: var(--s360-accent); }

main { max-width: 72rem; margin: 0 auto; padding: 0 var(--s360-space); }

.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(1.5rem, 4vw, 3rem); max-width: 48rem; }
.eyebrow { margin: 0 0 .75rem; color: var(--s360-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
h1 { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.12; letter-spacing: -.02em; }
h2 { margin: 0 0 1.25rem; font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--s360-muted); margin: 0 0 1.5rem; }

.button {
  display: inline-block; padding: .75rem 1.25rem; border-radius: 10px;
  background: var(--s360-accent); color: var(--s360-accent-text);
  font-weight: 600; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

.section { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }

.steps, .cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li, .cards li {
  background: var(--s360-surface); border: 1px solid var(--s360-line);
  border-radius: var(--s360-radius); padding: 1.25rem;
}
.steps { counter-reset: step; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .75rem;
  border-radius: 50%; background: var(--s360-accent); color: var(--s360-accent-text); font-weight: 700;
}
.steps p, .cards p { margin: 0; color: var(--s360-muted); }

.state { display: inline-flex; gap: .6rem; align-items: center; padding: .6rem 1rem; border-radius: 999px; background: var(--s360-surface); border: 1px solid var(--s360-line); font-weight: 600; }
.state-ok .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--s360-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s360-ok) 25%, transparent); }

.facts { display: grid; gap: .75rem; margin: 1.5rem 0 0; max-width: 40rem; }
.facts div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; padding: .85rem 1rem; background: var(--s360-surface); border: 1px solid var(--s360-line); border-radius: 10px; }
.facts dt { color: var(--s360-muted); }
.facts dd { margin: 0; font-weight: 600; }

.foot { max-width: 72rem; margin: 2rem auto 0; padding: 1.5rem var(--s360-space) 2.5rem; color: var(--s360-muted); font-size: .875rem; border-top: 1px solid var(--s360-line); }

@media (max-width: 40rem) {
  .nav { flex-basis: 100%; order: 3; }
  .facts div { grid-template-columns: 1fr; gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Session, forms and notices */
.session { display: flex; gap: .9rem; align-items: center; }
.session .who { font-weight: 600; color: var(--s360-text); text-decoration: none; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--s360-muted); cursor: pointer; text-decoration: underline; }
button.link:hover { color: var(--s360-text); }
.button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.button.small { padding: .4rem .85rem; font-size: .9rem; }
.button.secondary { background: var(--s360-surface); color: var(--s360-text); border: 1px solid var(--s360-line); }

.panel { max-width: 34rem; margin: clamp(1.5rem, 5vw, 3rem) auto; padding: clamp(1.25rem, 4vw, 2rem); background: var(--s360-surface); border: 1px solid var(--s360-line); border-radius: var(--s360-radius); }
.section.panel { max-width: 40rem; margin-left: 0; }
.panel h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }

.form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }
.field input {
  width: 100%; padding: .7rem .85rem; font: inherit; color: var(--s360-text);
  background: var(--s360-bg); border: 1px solid var(--s360-line); border-radius: 10px;
}
.field input:focus-visible { outline: 3px solid var(--s360-focus); outline-offset: 1px; border-color: var(--s360-accent); }
.hint { margin: 0; color: var(--s360-muted); font-size: .875rem; }
.alert, .notice { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 10px; font-weight: 600; }
.alert { background: color-mix(in srgb, #c62828 12%, var(--s360-surface)); color: var(--s360-text); border: 1px solid color-mix(in srgb, #c62828 45%, transparent); }
.notice { background: color-mix(in srgb, var(--s360-ok) 12%, var(--s360-surface)); border: 1px solid color-mix(in srgb, var(--s360-ok) 45%, transparent); }
.links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .4rem; }
.qr { display: grid; place-items: center; margin: 1.25rem 0; }
.qr svg { width: min(15rem, 100%); height: auto; background: #fff; padding: .5rem; border-radius: 10px; }
.secret code { display: inline-block; padding: .5rem .75rem; background: var(--s360-bg); border: 1px solid var(--s360-line); border-radius: 8px; font-size: 1rem; letter-spacing: .08em; word-break: break-all; }

/* Projects */
.heading-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; }
.heading-row .lead { margin-bottom: 0; }
.empty { padding: 1.5rem; background: var(--s360-surface); border: 1px dashed var(--s360-line); border-radius: var(--s360-radius); color: var(--s360-muted); }
.project-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; }
.project-card { display: grid; gap: .25rem; padding: 1rem 1.25rem; background: var(--s360-surface); border: 1px solid var(--s360-line); border-radius: var(--s360-radius); color: var(--s360-text); text-decoration: none; }
.project-card:hover { border-color: var(--s360-accent); }
.project-name { font-weight: 700; font-size: 1.05rem; }
.project-target { color: var(--s360-muted); font-size: .9rem; word-break: break-all; }
.project-meta { display: flex; gap: .75rem; align-items: center; margin-top: .25rem; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--s360-accent) 14%, var(--s360-surface)); color: var(--s360-text); font-size: .8rem; font-weight: 600; }
.when { color: var(--s360-muted); font-size: .85rem; }

.tracker { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; counter-reset: none; }
.tracker-step { display: grid; justify-items: center; gap: .3rem; text-align: center; position: relative; padding-top: .25rem; }
.tracker-step::before { content: ""; position: absolute; top: .95rem; left: -50%; width: 100%; height: 3px; background: var(--s360-line); z-index: 0; }
.tracker-step:first-child::before { display: none; }
.tracker-step.done::before, .tracker-step.current::before, .tracker-step.failed::before { background: var(--s360-accent); }
.tracker-dot { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 3px solid var(--s360-line); background: var(--s360-surface); position: relative; z-index: 1; }
.tracker-step.done .tracker-dot { background: var(--s360-accent); border-color: var(--s360-accent); }
.tracker-step.current .tracker-dot { border-color: var(--s360-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--s360-accent) 22%, transparent); }
.tracker-step.failed .tracker-dot { background: #c62828; border-color: #c62828; }
.tracker-label { font-weight: 700; }
.tracker-state { color: var(--s360-muted); font-size: .85rem; }
.prose { white-space: pre-line; font-weight: 400; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.timeline li { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .7rem 1rem; background: var(--s360-surface); border: 1px solid var(--s360-line); border-radius: 10px; }
.field textarea { width: 100%; padding: .7rem .85rem; font: inherit; color: var(--s360-text); background: var(--s360-bg); border: 1px solid var(--s360-line); border-radius: 10px; resize: vertical; }
.field textarea:focus-visible { outline: 3px solid var(--s360-focus); outline-offset: 1px; border-color: var(--s360-accent); }
@media (max-width: 40rem) {
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
  .tracker-label { font-size: .85rem; }
}.plan-summary { margin: 1.25rem 0; padding: .85rem 1rem; background: var(--s360-surface); border: 1px solid var(--s360-line); border-radius: 10px; }
.plan-summary p { margin: 0; }
.plan-summary .notice { margin-top: .5rem; padding-left: .75rem; border-left: 4px solid var(--s360-focus); font-weight: 600; }
