/* ===========================================================================
   static/account.css — the account page and the developer console.

   One card, centred, on the page shell's own ground. No new colour: every
   value here is a token from instrument.css or skin.css, so the sign-in card
   is the same material as every panel in the terminal and follows the theme
   and the accent without a second definition.
   =========================================================================== */

.acc-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 34px 34px 28px;
  border: 1px solid var(--i-hair, rgba(255, 255, 255, 0.09));
  border-radius: 14px;
  background: var(--i-surface-1, #0e0e11);
}

.acc-title {
  margin: 0 0 8px;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--i-ink-1);
}

.acc-lede {
  margin: 0 0 22px;
  max-width: 52ch;
  color: var(--i-ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.acc-body { display: flex; flex-direction: column; gap: 18px; }
.acc-form { display: flex; flex-direction: column; gap: 16px; }

.acc-field { display: flex; flex-direction: column; gap: 6px; }

.acc-label {
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--i-ink-3);
}

.acc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid var(--i-hair-strong, rgba(255, 255, 255, 0.16));
  border-radius: 8px;
  background: var(--i-void, #08080a);
  color: var(--i-ink-1);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  /* Transition on the ring only — never on anything that changes layout, so a
     field cannot shift under a cursor mid-type. */
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.acc-input:focus {
  outline: none;
  border-color: var(--i-orchid, #E1AD66);
  box-shadow: 0 0 0 3px rgba(var(--i-accent-rgb, 225, 173, 102), 0.16);
}

.acc-hint { font-size: 11.5px; line-height: 1.5; color: var(--i-ink-3); }

/* `text-decoration: none` IS LOAD-BEARING, because this class is rendered as
   BOTH a <button> and an <a>.

   Sign in, create and reset build it as a <button>, which the user agent does
   not underline. The first-run view builds the same class as an <a href> —
   "Create the first account", the single primary action on the first screen of
   a fresh install — and NOTHING in this build resets an anchor's underline.
   There is no global `a` rule anywhere; instrument.css documents the same trap
   for the Related Intelligence chips when they became anchors.

   Measured on /account: the <a> form computed `text-decoration-line:
   underline` while the masthead's own CTA computed `none`, so the loudest
   control on the page was the only one dressed as a text link.

   NOT a general anchor reset. A prose link SHOULD be underlined — that is how
   a reader finds it — and blanket-removing it is a real accessibility
   regression. This names one control that is a control. */
.acc-submit {
  align-self: flex-start;
  text-decoration: none;
  padding: 11px 22px;
  border: 1px solid var(--i-orchid, #E1AD66);
  border-radius: 999px;
  background: var(--i-accent-wash, rgba(225, 173, 102, 0.12));
  color: var(--i-ink-1);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.acc-submit:hover:not(:disabled) { background: rgba(var(--i-accent-rgb, 225, 173, 102), 0.22); }
.acc-submit:disabled { opacity: 0.6; cursor: progress; }

.acc-quiet {
  border: 1px solid var(--i-hair-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--i-ink-2);
  padding: 6px 14px;
  font-size: 12.5px;
  cursor: pointer;
}

.acc-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--i-hair);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.acc-link { color: var(--i-orchid, #E1AD66); text-decoration: none; }
.acc-link:hover { text-decoration: underline; }
.acc-sep { color: var(--i-ink-4); }

/* A notice is a status, not an alert box: same weight as body text, coloured
   only at the mark. `aria-live` is on the element in JS. */
.acc-notice {
  margin: 0;
  padding: 10px 12px;
  border-left: 2px solid var(--i-orchid);
  border-radius: 0 6px 6px 0;
  background: rgba(var(--i-accent-rgb, 225, 173, 102), 0.07);
  color: var(--i-ink-1);
  font-size: 13px;
  line-height: 1.55;
}
.acc-notice[data-tone="ok"]   { border-left-color: var(--i-bull); }
.acc-notice[data-tone="warn"] { border-left-color: var(--i-bear); }

.acc-step { display: flex; flex-direction: column; gap: 12px; }
.acc-step-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--i-ink-3);
}

/* ---- onboarding ---------------------------------------------------------- */

.acc-question {
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--i-hair);
}
.acc-question:last-of-type { border-bottom: 0; }

.acc-q-legend { display: flex; align-items: baseline; gap: 10px; padding: 0; }
.acc-q-index {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--i-orchid);
}
.acc-q-prompt { font-size: 16px; color: var(--i-ink-1); }
.acc-q-why { margin: 6px 0 12px 28px; font-size: 12px; color: var(--i-ink-3); }
.acc-q-multi { margin: 8px 0 0 28px; font-size: 11.5px; color: var(--i-ink-4); }

.acc-options { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 28px; }

.acc-option {
  padding: 8px 14px;
  border: 1px solid var(--i-hair-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--i-ink-2);
  font-size: 13px;
  cursor: pointer;
  /* Colour and border only. Nothing here animates size — a chip that grows
     under the pointer moves the chip beside it. */
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.acc-option:hover { border-color: var(--i-ink-3); color: var(--i-ink-1); }
.acc-option[aria-pressed="true"] {
  border-color: var(--i-orchid);
  background: rgba(var(--i-accent-rgb, 225, 173, 102), 0.16);
  color: var(--i-ink-1);
}

/* ---- recommendations ----------------------------------------------------- */

.acc-recs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.acc-rec {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--i-hair);
  border-radius: 9px;
  background: var(--i-void);
}
.acc-rec-code {
  grid-row: span 2;
  align-self: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--i-orchid);
  text-decoration: none;
}
.acc-rec-why { font-size: 13.5px; color: var(--i-ink-1); }
.acc-rec-because { font-size: 11.5px; color: var(--i-ink-3); }

/* ---- tiers --------------------------------------------------------------- */

.acc-tiers { display: flex; flex-direction: column; gap: 14px; }
.acc-tier {
  padding: 18px;
  border: 1px solid var(--i-hair);
  border-radius: 11px;
  background: var(--i-void);
}
.acc-tier[data-current="true"] {
  border-color: var(--i-orchid);
  background: rgba(var(--i-accent-rgb, 225, 173, 102), 0.05);
}
.acc-tier-head { display: flex; align-items: center; gap: 10px; }
.acc-tier-name { margin: 0; font-size: 17px; color: var(--i-ink-1); }
.acc-tier-chip {
  padding: 2px 9px;
  border: 1px solid var(--i-orchid);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--i-orchid);
}
.acc-tier-blurb { margin: 8px 0 6px; font-size: 13.5px; line-height: 1.6; color: var(--i-ink-2); }
.acc-tier-price { margin: 0 0 10px; font-size: 12px; color: var(--i-ink-3); }
.acc-tier-unlocks {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.acc-tier-unlocks li {
  padding: 3px 9px;
  border: 1px solid var(--i-hair-strong);
  border-radius: 5px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--i-ink-3);
}

.acc-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
  font-size: 13.5px;
}
.acc-meta dt { color: var(--i-ink-3); }
.acc-meta dd { margin: 0; color: var(--i-ink-1); }

@media (max-width: 640px) {
  .acc-card { padding: 24px 18px 20px; }
  .acc-options, .acc-q-why, .acc-q-multi { margin-left: 0; }
  .acc-rec { grid-template-columns: minmax(0, 1fr); }
  .acc-rec-code { grid-row: auto; }
}

/* ---- developer console ---------------------------------------------------- */

.dev-panel { max-width: 980px; margin: 0 auto 18px; }
.dev-panel-title {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--i-ink-3);
}

/* The table scrolls INSIDE its own box. The document must never scroll
   sideways — the same rule the terminal's screens follow. */
.dev-scroll { overflow-x: auto; overscroll-behavior-x: contain; }

.dev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.dev-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--i-hair-strong);
  background: var(--i-surface-1);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--i-ink-3);
  white-space: nowrap;
}
.dev-table td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--i-hair);
  color: var(--i-ink-2);
  vertical-align: top;
}
.dev-table tr:last-child td { border-bottom: 0; }

.dev-key, .dev-val, .dev-detail {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.dev-key { color: var(--i-ink-1); white-space: nowrap; }
.dev-val { color: var(--i-ink-2); white-space: nowrap; }
.dev-detail { color: var(--i-ink-3); font-size: 11.5px; word-break: break-word; }

/* An issued credential. Selectable, monospaced, and visually separated from
   everything around it — it is going to be copied by hand. */
.dev-issued { margin-top: 14px; }
.dev-secret {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--i-orchid);
  user-select: all;
}

/* The chip belongs BESIDE the tier name, not above it. Rendered, it stacked:
   the page shell's own `#page-root [class]` rules reach these elements and win
   on specificity over a bare class selector. Doubling the class is enough to
   outrank them without an !important. */
#page-root [class][class].acc-tier-head {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
#page-root [class][class].acc-tier-name { margin: 0; }
#page-root [class][class].acc-tier { padding: 16px 18px; }
#page-root [class][class].acc-tier-blurb { margin: 6px 0 4px; }

/* Same shape, same cause, on the onboarding legend and the field rows. */
#page-root [class][class].acc-q-legend {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
}
#page-root [class][class].acc-options { display: flex; flex-wrap: wrap; gap: 8px; }
#page-root [class][class].acc-field { display: flex; flex-direction: column; gap: 6px; }
#page-root [class][class].acc-foot { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   DEV CONSOLE — per-account feature toggles and the audit-log analytics.
   ========================================================================== */

.dev-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  margin: 12px 0;
}

/* Three states, three appearances, and the STATE IS IN THE TEXT as well as the
   colour — "OCHAIN off" reads correctly in monochrome, in print, and to a
   reader who cannot separate the accent from the border. */
.dev-feature {
  padding: 6px 10px;
  border: 1px solid var(--i-line, #2a2a32);
  background: transparent;
  color: var(--i-ink-3);
  font: 11px var(--mi-fig, Consolas), monospace;
  text-align: left;
  cursor: pointer;
}

.dev-feature-tier { border-style: dashed; }
.dev-feature-on   { border-color: var(--i-bull, #35c26d); color: var(--i-ink-1); }
.dev-feature-off  { border-color: var(--i-bear, #e5484d); color: var(--i-bear, #e5484d); }

.dev-feature[disabled] { opacity: 0.5; cursor: wait; }

/* ---- The analytics bars ------------------------------------------------- */

.dev-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  margin-top: 12px;
  padding: 6px;
  border: 1px solid var(--i-line, #2a2a32);
}

.dev-chart-bar {
  flex: 1 1 4px;
  min-width: 3px;
  background: var(--i-accent, #f6c85f);
  /* A day with no events keeps its slot at 1px rather than closing the gap.
     A chart that silently omits empty days compresses time and makes a quiet
     week look like a busy one. */
  min-height: 1px;
}

.dev-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font: 10px var(--mi-fig, Consolas), monospace;
  color: var(--i-ink-3);
}

/* ==========================================================================
   CHECKOUT (37b) — the summary, and the stub stated as a stub.

   Same cascade rules as the pricing table on the landing page: `outline` for
   edges, `backdrop-filter` where a fill is wanted, because skin.css's purge
   nulls background/border/radius on classed elements inside classed wrappers
   at a specificity nothing honest outranks (CLAUDE.md hazard 24).
   ========================================================================== */

#page-root .ckMast { margin: 0 0 24px; }

#page-root .ckTitle {
  margin: 0 0 6px !important;
  font-family: var(--mi-display, Georgia, serif);
  font-size: var(--i-t-xl);
  font-weight: 400;
  color: var(--i-ink-1) !important;
}

#page-root .ckLede {
  margin: 0 !important;
  max-width: 62ch;
  font-size: var(--i-t-sm);
  line-height: 1.6;
  color: var(--i-ink-2) !important;
}

#page-root .ckSection[class] {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 14px !important;
  outline: 1px solid color-mix(in srgb, var(--i-ink-3, #8d8781) 26%, transparent);
  outline-offset: -1px;
  max-width: 640px;
}

#page-root .ckHead {
  margin: 0 !important;
  font-family: var(--mi-display, Georgia, serif);
  font-size: var(--i-t-lg);
  font-weight: 400;
  color: var(--i-ink-1) !important;
}

#page-root .ckBlurb,
#page-root .ckNote {
  margin: 0 !important;
  font-size: var(--i-t-sm);
  line-height: 1.6;
  color: var(--i-ink-2) !important;
}

#page-root .ckIncluded { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }

#page-root .ckIncludedItem {
  position: relative;
  padding-left: 15px;
  font-size: var(--i-t-sm);
  line-height: 1.45;
  color: var(--i-ink-2) !important;
}
#page-root .ckIncludedItem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 1px;
  background-color: var(--i-accent, #e1ad66);
}

#page-root .ckSeats { display: flex; align-items: center; gap: 10px; }

#page-root .ckSeatLabel {
  font-size: var(--i-t-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--i-ink-3) !important;
}

#page-root .ckSeatInput[class] {
  width: 88px;
  padding: 7px 10px;
  border: 0 !important;
  border-radius: 7px !important;
  outline: 1px solid color-mix(in srgb, var(--i-ink-3, #8d8781) 34%, transparent);
  outline-offset: -1px;
  background: transparent !important;
  color: var(--i-ink-1) !important;
  font-family: var(--mi-fig, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
}

#page-root .ckTotal {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--i-ink-3, #8d8781) 22%, transparent);
}

#page-root .ckTotalLabel {
  font-size: var(--i-t-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--i-ink-3) !important;
}

#page-root .ckTotalValue {
  font-family: var(--mi-fig, ui-monospace, monospace);
  font-size: 26px;
  color: var(--i-ink-1) !important;
  font-variant-numeric: tabular-nums;
}

#page-root .ckTotalWork { font-size: var(--i-t-sm); color: var(--i-ink-3) !important; }

#page-root .ckSwitch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#page-root .ckSave { font-size: var(--i-t-sm); color: var(--i-accent, #e1ad66) !important; }

/* THE STUB. Marked out with a rule and a slightly darker ground so it reads as
   a statement about the page rather than as another section of it — but NOT
   styled as a warning. It is not an error; it is the current state of a
   feature, said plainly (42a). */
#page-root .ckStub {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 18px;
  border-radius: 11px !important;
  outline: 1px dashed color-mix(in srgb, var(--i-ink-3, #8d8781) 32%, transparent);
  outline-offset: -1px;
  backdrop-filter: brightness(0.72);
}

#page-root .ckStubHead {
  margin: 0 !important;
  font-size: var(--i-t-md);
  font-weight: 500;
  color: var(--i-ink-1) !important;
}

#page-root .ckStubBody {
  margin: 0 !important;
  font-size: var(--i-t-sm);
  line-height: 1.6;
  color: var(--i-ink-2) !important;
}

#page-root .ckStubActions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

#page-root .ckPlanPick { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

#page-root .ckPlanPickItem {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(120px, auto);
  gap: 4px 14px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--i-ink-3, #8d8781) 18%, transparent);
}

#page-root .ckPlanPickLink[class] {
  font-family: var(--mi-display, Georgia, serif);
  font-size: var(--i-t-md);
  color: var(--i-ink-1) !important;
  text-decoration: none !important;
}
#page-root .ckPlanPickLink[class]:hover { color: var(--i-accent, #e1ad66) !important; }

#page-root .ckPlanPickPrice {
  font-family: var(--mi-fig, ui-monospace, monospace);
  font-size: var(--i-t-sm);
  color: var(--i-ink-3) !important;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#page-root .ckPlanPickWhat {
  grid-column: 1 / -1;
  font-size: var(--i-t-sm);
  line-height: 1.5;
  color: var(--i-ink-2) !important;
}

#page-root .ckFine { margin: 8px 0 0 !important; font-size: var(--i-t-sm); color: var(--i-ink-3) !important; }

@media (max-width: 767px) {
  #page-root .ckSection[class] { padding: 18px; }
  #page-root .ckPlanPickItem { grid-template-columns: minmax(0, 1fr); }
  #page-root .ckPlanPickPrice { text-align: left; }
}

/* ==========================================================================
   THE FORM KIT'S OWN CHROME (frontend/kit/forms.js)
   --------------------------------------------------------------------------
   Items 376, 481, 490, 492, 500. Four classes, all emitted by `enhanceForm`
   and by nothing else, so nothing here can reach a form that did not ask for
   it.

   SPECIFICITY IS (1,4,0) BECAUSE THAT IS WHAT IT TAKES. skin.css sets the
   whole label family through `#app-root [class][class]:is(th, …)` which is
   (1,3,0) `!important`, and among important declarations the more specific
   still wins (hazard 51). `#page-root [class][class][class]` clears it, and
   this sheet loads after skin.css on the account routes.
   ========================================================================== */

#page-root [class][class].kfError {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.45;
  /* --i-bear and not a fresh red: this is the same "something is wrong"
     the direction ladder already means, and a second red is a second thing
     for a reader to learn. */
  color: var(--i-bear);
}

#page-root [class][class].kfError[hidden] { display: none; }

/* The input the message belongs to. `aria-invalid` is the attribute a screen
   reader reads; `data-invalid` is the one CSS matches, because styling on an
   ARIA attribute makes the two impossible to change apart later. */
#page-root [class][class].acc-input[data-invalid] {
  border-color: var(--i-bear);
  /* An outline rather than a second border: `border` is nulled by skin.css's
     purge at a specificity no honest selector here beats (hazard 24), and an
     outline draws an edge where a border cannot. */
  outline: 1px solid var(--i-bear);
  outline-offset: -1px;
}

#page-root [class][class].kfSummary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--i-bear);
  /* `background-image`, not `background-color`: the nested-fill purge nulls
     the latter at (1,18,0) !important and this panel would be a floating
     paragraph with a red bar beside it (hazard 53). */
  background-image: linear-gradient(
    rgba(var(--i-bear-rgb), 0.09), rgba(var(--i-bear-rgb), 0.09));
  border-radius: var(--i-r-chip);
}

#page-root [class][class].kfSummary[hidden] { display: none; }

#page-root [class][class].kfSummaryHead {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--i-ink-1);
}

#page-root [class][class].kfSummaryList {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
}

/* These stay underlined. Nothing in this build resets an anchor's underline
   and that is deliberate for prose links — and these ARE prose links: each one
   is a sentence a reader clicks to be taken to the field it describes. */
#page-root [class][class].kfSummaryList a { color: var(--i-ink-2); }

#page-root [class][class].kfSteps {
  margin: 0 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--i-ink-3);
}

/* The reveal toggle sits with the hint under the box rather than inside it:
   an absolutely-positioned control over an input covers the end of a long
   value, which on a password field is exactly the part being checked. */
#page-root [class][class].kfReveal {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 0;
  border: none;
  background: none;
  color: var(--i-ink-3);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

#page-root [class][class].kfReveal:hover,
#page-root [class][class].kfReveal:focus-visible { color: var(--i-accent); }

@media (forced-colors: active) {
  #page-root [class][class].kfSummary { border: 1px solid CanvasText; }
  #page-root [class][class].acc-input[data-invalid] { outline: 2px solid CanvasText; }
}
