/* QBN ID — page-local styles.
   The design system is /assets/colors_and_type.css + /assets/kit.css, owned by
   panopticon-www and shared with every Panopticon page. This file only lays out
   what the kit has no component for, prefixed v-, and consumes its tokens.
   It is a file rather than an inline <style> because the CSP is style-src 'self'. */

/* kit.css paints a dotted texture on body; the sibling pages drop it. */
body { -webkit-font-smoothing: antialiased; background-image: none; }

/* panopticon.svg paints through .st0, which it does not define. */
.pn-bar__logo svg { width: 34px; height: 24px; display: block; }
.pn-bar__logo .st0 { fill: currentColor; }
.pn-bar__word { text-decoration: none; }
.pn-bar__navitem { text-decoration: none; }

/* Buttons are <button>s here, so they need the anchor's lack of chrome. */
button.pn-btn { border-radius: 0; }
a.pn-btn { text-decoration: none; }

.v-main { max-width: 760px; padding-top: 56px; padding-bottom: 72px; }

/* Links inside prose are identity colour; components colour themselves. */
.v-main a:not(.pn-btn) { color: var(--brand); overflow-wrap: anywhere; text-underline-offset: 3px; }
.v-main a:not(.pn-btn):hover { color: var(--fg); }

.v-eyebrow { margin: 0 0 16px; color: var(--fg-3); }
.v-title { margin: 0 0 20px; overflow-wrap: anywhere; }
.v-lede { max-width: 60ch; margin: 0 0 32px; color: var(--fg-2); }
.v-main p { max-width: 66ch; }
.v-hint { color: var(--fg-3); margin: 14px 0 0; }
.v-hint--warn { color: var(--fg-2); border-left: var(--bw-bold) solid var(--accent); padding-left: 12px; }
.v-after { margin: 28px 0 0; color: var(--fg-2); }

/* ---- flash messages ---- */
.v-flash {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em;
  padding: 12px 14px; margin: 0 0 32px; border: var(--bw) solid var(--rule-strong);
  background: var(--bg-raised);
}
.v-flash--notice { border-color: var(--accent); box-shadow: var(--shadow-hard-accent); }
.v-flash--error { border-color: var(--signal); box-shadow: var(--shadow-hard-signal); }

/* ---- numbered steps ---- */
.v-steps { list-style: none; counter-reset: step; margin: 0 0 36px; padding: 0;
  border-top: var(--bw-rule) solid var(--rule-strong); }
.v-steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr;
  gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.v-steps li::before { content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: var(--accent); padding-top: 4px; }
.v-steps li > * { grid-column: 2; }

/* ---- forms ---- */
.v-card { margin: 0 0 24px; }
.v-card .pn-card__body { padding: 20px 18px 22px; }
.v-card h2 { margin: 0 0 8px; }
.v-form { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.v-form label { display: block; margin: 0 0 10px; color: var(--fg-2); }
.v-input {
  width: 100%; margin: 0 0 18px; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 14px; color: var(--fg);
  background: var(--bg-sunken); border: var(--bw) solid var(--rule-strong); border-radius: 0;
}
.v-input::placeholder { color: var(--fg-3); }
.v-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-hard-accent); }

/* The one-time code: the thing the whole flow is about, so it is set large. */
.v-code {
  display: block; margin: 10px 0 4px; padding: 14px 16px;
  font-family: var(--font-mono); font-size: clamp(18px, 4vw, 26px); font-weight: 700;
  letter-spacing: .06em; color: var(--accent); background: var(--bg-sunken);
  border: var(--bw) dashed var(--accent); user-select: all; overflow-wrap: anywhere;
}
.v-addr {
  display: block; padding: 10px 0; border-top: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; color: var(--fg);
  overflow-wrap: anywhere;
}
.v-addr:first-of-type { border-top: none; }

/* ---- facts (spec sheet) ---- */
.v-facts { display: grid; grid-template-columns: max-content 1fr; margin: 0 0 36px;
  border-top: var(--bw-rule) solid var(--rule-strong); }
.v-facts dt, .v-facts dd { padding: 12px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.v-facts dt { padding-right: 24px; color: var(--fg-3); }
.v-facts dd { overflow-wrap: anywhere; }
.v-facts img, .v-badge img { display: block; }
.v-badge { margin: 0 0 32px; }

/* ---- account actions ---- */
.v-signout { margin: 32px 0 0; }
.v-danger { margin: 40px 0 0; border-top: 1px solid var(--rule); padding-top: 20px; }
.v-danger summary { cursor: pointer; color: var(--signal); }
.v-danger .v-form { margin-top: 18px; }
.pn-btn--danger { border-color: var(--signal); color: var(--signal); }
.pn-btn--danger:hover { background: var(--signal); color: var(--bg); }

/* The bar is one non-wrapping flex row; shed the readout first, as the
   sibling pages do. */
@media (max-width: 860px) {
  .pn-bar { padding: 12px 20px; gap: 14px; flex-wrap: wrap; row-gap: 8px; }
  .pn-bar__readout { display: none; }
  .pn-bar__nav { gap: 16px; margin-left: 8px; }
  .pn-wrap { padding: 0 20px; }
  .v-main { padding-top: 36px; padding-bottom: 48px; }
  .pn-footer { padding-left: 20px; padding-right: 20px; }
  .pn-footer__row { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 480px) {
  .pn-wrap { padding: 0 16px; }
  .v-facts { grid-template-columns: 1fr; }
  .v-facts dt { border-bottom: none; padding-bottom: 0; }
  .v-form .pn-btn { width: 100%; justify-content: center; }
}

/* ---- profile editing ---- */
.v-textarea { min-height: 220px; resize: vertical; line-height: 1.5; font-size: 14px; }
.v-choice { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.v-choice legend { padding: 0; margin: 0 0 10px; color: var(--fg-2); }
.v-radio { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--fg); cursor: pointer; }
.v-radio input { accent-color: var(--accent); margin: 0; }
.v-form--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; width: 100%; }
.v-form--grid > div { display: flex; flex-direction: column; min-width: 0; }
.v-form--grid .v-span { grid-column: 1 / -1; }
.v-form--grid .pn-btn { grid-column: 1 / -1; justify-self: start; }

/* ---- claimed names elsewhere ---- */
.v-section { margin: 0 0 36px; }
.v-identities { list-style: none; margin: 0 0 12px; padding: 0; border-top: var(--bw-rule) solid var(--rule-strong); }
.v-identities li { display: grid; grid-template-columns: minmax(96px, max-content) 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--rule); }
.v-identity__site { color: var(--fg-3); }
.v-identity__name { overflow-wrap: anywhere; }
.v-identity__remove { margin: 0; }
.v-identity__remove .pn-btn { padding: 4px 10px; font-size: 12px; }

/* ---- member-written markdown ---- */
.v-md { max-width: 66ch; color: var(--fg); }
.v-md > :first-child { margin-top: 0; }
.v-md > :last-child { margin-bottom: 0; }
.v-md p, .v-md ul, .v-md ol, .v-md blockquote, .v-md pre, .v-md table { margin: 0 0 1em; }
.v-md h3, .v-md h4, .v-md h5, .v-md h6 { margin: 1.4em 0 .5em; line-height: 1.2; }
.v-md h3 { font-size: 1.25em; }
.v-md h4 { font-size: 1.1em; }
.v-md h5, .v-md h6 { font-size: 1em; }
.v-md ul, .v-md ol { padding-left: 1.4em; }
.v-md blockquote { border-left: var(--bw-bold) solid var(--rule-strong); padding-left: 12px; color: var(--fg-2); }
.v-md code { font-family: var(--font-mono); font-size: .9em; background: var(--bg-sunken); padding: 1px 4px; }
.v-md pre { background: var(--bg-sunken); padding: 12px 14px; overflow-x: auto; border: var(--bw) solid var(--rule); }
.v-md pre code { background: none; padding: 0; }
.v-md hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5em 0; }
.v-md table { border-collapse: collapse; }
.v-md th, .v-md td { border-bottom: 1px solid var(--rule); padding: 6px 12px 6px 0; text-align: left; }

@media (max-width: 480px) {
  .v-form--grid { grid-template-columns: 1fr; }
  .v-identities li { grid-template-columns: 1fr auto; }
  .v-identity__site { grid-column: 1 / -1; padding-bottom: 0; }
}

/* ---- OpenID consent ---- */
.v-consent { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.v-consent .v-form { flex-direction: row; }
.v-signout { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
