/* ==========================================================================
   Life OS — companion web app
   One stylesheet, flat fills only, grayscale + a single blue accent.
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */

:root {
  --bg:        #FFFFFF;
  --bg-sub:    #F5F5F7;
  --surface:   #FFFFFF;
  --surface-2: #F5F5F7;

  --text:   #1D1D1F;
  --text-2: #6E6E73;
  --text-3: #86868B;

  --accent:      #007AFF;
  --accent-press:#0062CC;
  --accent-soft: rgba(0, 122, 255, 0.10);

  --line:   #D2D2D7;
  --line-2: #E8E8ED;

  --good:      #248A3D;
  --good-fill: #34C759;
  --good-bg:   rgba(52, 199, 89, 0.12);

  --warn:      #9A5B00;
  --warn-fill: #FF9F0A;
  --warn-bg:   rgba(255, 159, 10, 0.14);

  --crit:      #D70015;
  --crit-fill: #FF3B30;
  --crit-bg:   rgba(255, 59, 48, 0.10);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Arial, sans-serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;

  --rail: 1160px;
  --pad: clamp(20px, 5vw, 40px);

  --head-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #000000;
    --bg-sub:    #000000;
    --surface:   #1C1C1E;
    --surface-2: #2C2C2E;

    --text:   #F5F5F7;
    --text-2: #A1A1A6;
    --text-3: #86868B;

    --accent:      #0A84FF;
    --accent-press:#409CFF;
    --accent-soft: rgba(10, 132, 255, 0.16);

    --line:   #3A3A3C;
    --line-2: #2C2C2E;

    --good:      #30D158;
    --good-fill: #30D158;
    --good-bg:   rgba(48, 209, 88, 0.16);

    --warn:      #FFB340;
    --warn-fill: #FF9F0A;
    --warn-bg:   rgba(255, 159, 10, 0.18);

    --crit:      #FF6961;
    --crit-fill: #FF453A;
    --crit-bg:   rgba(255, 69, 58, 0.16);
  }
}

/* --- reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, figure, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Explicit display rules below would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- type ----------------------------------------------------------------- */

h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
}
h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }

.lede { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.45; color: var(--text-2); }
.muted { color: var(--text-2); }
.fine { font-size: 13px; line-height: 1.6; color: var(--text-3); }
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rail { width: 100%; max-width: var(--rail); margin: 0 auto; padding: 0 var(--pad); }
.rail-narrow { max-width: 820px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.skip:focus { left: 12px; top: 12px; }

/* --- header --------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-2);
}
.head-in {
  max-width: var(--rail);
  margin: 0 auto;
  padding: 0 var(--pad);
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-right: auto;
  padding: 12px 0;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--text);
  position: relative;
  flex: none;
}
.brand .mark::after {
  content: "";
  position: absolute;
  inset: 4.5px;
  border-radius: 50%;
  background: var(--accent);
}

.nav {
  order: 3;
  width: 100%;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  margin-top: -4px;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

@media (min-width: 880px) {
  .nav { order: 0; width: auto; padding-bottom: 0; margin-top: 0; }
}

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: default; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-press); }

.btn-quiet { border-color: var(--line); color: var(--text); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); }

.btn-plain { color: var(--accent); padding: 6px 8px; }
.btn-plain:hover:not(:disabled) { background: var(--accent-soft); }

.btn-sm { padding: 7px 14px; font-size: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- generic surfaces ----------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: clamp(18px, 2.4vw, 24px);
}
@media (prefers-color-scheme: dark) { .card { border-color: var(--line); } }

.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-tight { padding: clamp(26px, 4vw, 40px) 0; }
.hr { height: 1px; background: var(--line-2); border: 0; margin: 0; }

/* --- footer --------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--line-2);
  background: var(--bg-sub);
  padding: 44px 0 40px;
  margin-top: 60px;
}
@media (prefers-color-scheme: dark) { .site-foot { background: var(--bg); border-top-color: var(--line); } }
.foot-in {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .foot-in { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }
.foot-in h4 { color: var(--text); margin-bottom: 12px; }
.foot-in li { margin-bottom: 8px; }
.foot-in a, .foot-in p { font-size: 14px; }
.foot-in a { color: var(--text-2); }
.foot-in a:hover { color: var(--text); }
.foot-note { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-2); }
@media (prefers-color-scheme: dark) { .foot-note { border-top-color: var(--line); } }

/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.dash { padding: 26px 0 10px; }

.dash-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.dash-top h1 { font-size: clamp(26px, 3.4vw, 36px); }
.dash-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stamp { font-size: 13px; color: var(--text-3); }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (min-width: 1040px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-areas:
      "summary chat"
      "cards   chat";
    column-gap: 26px;
  }
  .dash-summary { grid-area: summary; }
  .dash-cards   { grid-area: cards; }
  .dash-chat    { grid-area: chat; position: sticky; top: calc(var(--head-h) + 18px); }
  .dash-chat .chat { height: calc(100vh - var(--head-h) - 36px); }
}

/* summary tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
/* Beside the chat the main column is narrow, so a fixed 2x2 beats an orphan. */
@media (min-width: 1040px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1420px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 16px 16px 14px;
  min-width: 0;
}
@media (prefers-color-scheme: dark) { .tile { border-color: var(--line); } }
.tile-l {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tile-v {
  display: block;
  margin-top: 8px;
  font-size: clamp(30px, 3.6vw, 38px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.tile-sub {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-2);
  min-height: 1.4em;
  overflow-wrap: anywhere;
}
.tile .meter { margin-top: 12px; }

/* meter */
.meter {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) { .meter { background: #3A3A3C; } }
.meter > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: width 420ms ease;
}
.meter > i.is-good { background: var(--good-fill); }
.meter > i.is-warn { background: var(--warn-fill); }
.meter > i.is-crit { background: var(--crit-fill); }

/* state pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
  background: var(--surface-2);
  color: var(--text-2);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill.is-good { background: var(--good-bg); color: var(--good); }
.pill.is-warn { background: var(--warn-bg); color: var(--warn); }
.pill.is-crit { background: var(--crit-bg); color: var(--crit); }
.pill[hidden] { display: none; }

/* data cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.dcard {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 18px 18px 6px;
  min-width: 0;
}
@media (prefers-color-scheme: dark) { .dcard { border-color: var(--line); } }
.dcard-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
}
.dcard-head svg { width: 18px; height: 18px; flex: none; color: var(--text-3); }
.dcard-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.dcard-head .pill { margin-top: 0; margin-left: auto; }

.rows { border-top: 1px solid var(--line-2); }
@media (prefers-color-scheme: dark) { .rows { border-top-color: var(--line); } }
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 15px;
}
@media (prefers-color-scheme: dark) { .row { border-bottom-color: var(--line); } }
.row:last-child { border-bottom: 0; }
.row[hidden] { display: none; }
.row-l { color: var(--text-2); flex: 1 1 auto; min-width: 0; }
.row-v {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}
.row-note { padding: 10px 0 14px; font-size: 14px; color: var(--text-2); }

.dcard-empty {
  padding: 4px 0 16px;
  font-size: 14px;
  color: var(--text-3);
}
.dcard-empty[hidden], .rows[hidden] { display: none; }

/* notices */
.notice {
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-2);
  margin-top: 14px;
}
@media (prefers-color-scheme: dark) { .notice { border-color: var(--line); background: var(--surface); } }
.notice strong { color: var(--text); font-weight: 600; }
.notice.is-crit { border-color: var(--crit-bg); background: var(--crit-bg); color: var(--crit); }
.notice.is-crit strong { color: var(--crit); }

/* --- connect screen ------------------------------------------------------- */

.connect { padding: clamp(30px, 6vw, 70px) 0 20px; }
.connect-in { max-width: 560px; }
.connect h1 { margin-bottom: 16px; }
.connect .lede { margin-bottom: 26px; }

.steps { counter-reset: s; margin: 0 0 26px; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 14px 34px;
  font-size: 15px;
  color: var(--text-2);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: 1px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.steps li b { color: var(--text); font-weight: 600; }

.field { display: block; }
.field-l {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.code-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  transition: border-color 140ms ease;
}
.code-input::placeholder { color: var(--text-3); font-weight: 400; letter-spacing: 0.12em; }
.code-input:focus { border-color: var(--accent); }
.connect-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

.msg { font-size: 14px; color: var(--text-2); margin-top: 14px; }
.msg.is-crit { color: var(--crit); }
.msg[hidden] { display: none; }

/* --- chat ----------------------------------------------------------------- */

.chat {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  overflow: hidden;
  max-height: calc(100vh - var(--head-h) - 44px);
  min-height: 420px;
}
@media (prefers-color-scheme: dark) { .chat { border-color: var(--line); } }

.chat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}
@media (prefers-color-scheme: dark) { .chat-head { border-bottom-color: var(--line); } }
.chat-head svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.chat-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.chat-head .stamp { margin-left: auto; }

.chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.from-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble.from-ai {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 6px;
}
.bubble.is-error {
  align-self: flex-start;
  background: var(--crit-bg);
  color: var(--crit);
  border-bottom-left-radius: 6px;
}

.chat-intro { color: var(--text-2); font-size: 14px; padding: 4px 2px 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 0; }
.chip {
  border: 1px solid var(--line);
  background: none;
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease;
}
.chip:hover { background: var(--surface-2); color: var(--text); }

.bubble.is-typing { padding: 0; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 13px 16px; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-3);
  animation: blink 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.28; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { opacity: 0.6; } }

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line-2);
}
@media (prefers-color-scheme: dark) { .chat-form { border-top-color: var(--line); } }
.chat-input {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  max-height: 130px;
  transition: border-color 140ms ease;
}
.chat-input:focus { border-color: var(--accent); outline: none; }
.chat-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.send {
  flex: none;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.send:hover:not(:disabled) { background: var(--accent-press); }
.send:disabled { background: var(--text-3); cursor: default; }
.send svg { width: 18px; height: 18px; }

@media (max-width: 1039px) {
  .chat { max-height: none; min-height: 0; }
  .chat-log { max-height: 52vh; }
}

/* ==========================================================================
   CONTENT PAGES
   ========================================================================== */

.page-top { padding: clamp(34px, 5vw, 60px) 0 0; }
.page-top h1 { margin-bottom: 16px; }

.jump { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }
.jump a {
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.jump a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.block { padding: clamp(30px, 4.5vw, 52px) 0 0; }
.block > h2 { margin-bottom: 6px; }
.block > .eyebrow { margin-bottom: 10px; }

.qa { margin-top: 12px; border-top: 1px solid var(--line-2); }
@media (prefers-color-scheme: dark) { .qa { border-top-color: var(--line); } }
.qa details { border-bottom: 1px solid var(--line-2); }
@media (prefers-color-scheme: dark) { .qa details { border-bottom-color: var(--line); } }
.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.qa details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qa summary:hover { color: var(--accent); }
.qa .a { padding: 0 0 20px; color: var(--text-2); font-size: 15px; max-width: 74ch; }
.qa .a p + p { margin-top: 12px; }
.qa .a ul { margin: 10px 0 0; padding-left: 20px; list-style: disc; }
.qa .a li { margin-bottom: 7px; }
.qa .a strong, .qa .a b { color: var(--text); font-weight: 600; }
.qa .a code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.rel { border-top: 1px solid var(--line-2); padding: clamp(28px, 4vw, 44px) 0; }
@media (prefers-color-scheme: dark) { .rel { border-top-color: var(--line); } }
.rel-in { display: grid; gap: 20px; }
@media (min-width: 900px) { .rel-in { grid-template-columns: 170px minmax(0, 1fr); gap: 0 48px; } }
.rel-meta { align-self: start; }
@media (min-width: 900px) { .rel-meta { position: sticky; top: calc(var(--head-h) + 20px); } }
.ver { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.rel h2 { font-size: clamp(20px, 2.4vw, 26px); margin-bottom: 16px; }

.change > li { border-top: 1px solid var(--line-2); padding: 16px 0; }
@media (prefers-color-scheme: dark) { .change > li { border-top-color: var(--line); } }
.change > li:first-child { border-top: 0; padding-top: 0; }
.change h3 { font-size: 16px; margin-bottom: 6px; }
.change p { color: var(--text-2); font-size: 15px; max-width: 74ch; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 9px;
  background: var(--surface-2);
  color: var(--text-2);
}
.tag.new  { background: var(--accent-soft); color: var(--accent); }
.tag.fix  { background: var(--good-bg); color: var(--good); }
.tag.open { background: var(--warn-bg); color: var(--warn); }

/* --- invite --------------------------------------------------------------- */

.invite { padding: clamp(34px, 6vw, 64px) 0 0; }
.invite-in { max-width: 620px; }
.invite-in h1 { margin-bottom: 16px; }
.invite-in .steps { margin-top: 30px; }
.invite-in > .fine { margin-top: 30px; }
.aside p { margin-top: 4px; }
.code-card { margin: 26px 0 22px; }
.code-l {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
#codeText {
  font-size: clamp(30px, 8.6vw, 50px);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#codeText .sp { display: inline-block; width: 0.34em; }
.code-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.code-actions[hidden] { display: none; }
.copied { font-size: 13px; color: var(--good); opacity: 0; transition: opacity 180ms ease; }
.copied.show { opacity: 1; }
.state-bad #codeText { font-size: clamp(22px, 5vw, 30px); color: var(--text-3); letter-spacing: 0.02em; }

.aside {
  border-left: 2px solid var(--line);
  padding-left: 18px;
  margin-top: 34px;
}
.aside h4 { margin-bottom: 8px; }
.manual { margin-top: 28px; }
.manual .row-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.manual .code-input { flex: 1 1 220px; width: auto; font-size: 18px; }
.manual[hidden] { display: none; }
