/* =========================================================================
   Demo Tokens AG — shareholder verification
   Aesthetic: Swiss corporate banking. White paper, sans-serif throughout,
   bordered fields, restrained red accent. No editorial flourishes.
   ========================================================================= */

:root {
  --bg:            #FFFFFF;
  --surface:       #F5F4F1;
  --surface-deep:  #ECEAE4;
  --border:        #D4D2CC;
  --border-soft:   #E2E0DA;
  --border-strong: #6F6D67;

  --ink:           #111111;
  --ink-soft:      #2A2A28;
  --ink-mute:      #6B6963;

  --accent:        #1B2D5C;
  --accent-deep:   #122046;
  --pass:          #006B2D;
  --warn:          #B07000;
  --fail:          #9B1B2E;

  --frame-max:     780px;
  --frame-pad:     clamp(20px, 5vw, 36px);

  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; }

::selection { background: var(--ink); color: var(--bg); }

a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 1px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  white-space: nowrap;
}

.frame {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding-left:  var(--frame-pad);
  padding-right: var(--frame-pad);
}

/* ============== BRAND STRIPE & MASTHEAD ============== */

.brand-stripe {
  height: 4px;
  background: var(--accent);
  width: 100%;
}

.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 18px 0 16px;
}
.masthead .frame {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.dept {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

/* ============== INTRO ============== */

main { padding: clamp(40px, 6vw, 64px) 0 clamp(48px, 7vw, 80px); }

.intro { padding-bottom: clamp(28px, 4vw, 44px); }

.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 14px 0;
}

h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 18px 0;
  color: var(--ink);
  max-width: 22ch;
}

.lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0;
}

/* ============== FORM CARD ============== */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: clamp(24px, 3.6vw, 36px);
}

.fset {
  border: 0;
  padding: 0;
  margin: 0 0 28px 0;
}
.fset:last-of-type { margin-bottom: 22px; }

.fset legend {
  display: block;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  width: 100%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.fset .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide   { grid-column: 1 / -1; }
.field-narrow { grid-column: span 1; max-width: 16ch; }

.field label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}

.field input,
.field select {
  font: inherit;
  font-size: 15px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.field input::placeholder {
  color: var(--ink-mute);
  opacity: 0.65;
  font-style: normal;
  font-family: inherit;
}
.field input:hover,
.field select:hover { border-color: var(--ink-mute); }
.field input:focus,
.field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' stroke='%23111111' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
  padding-right: 32px;
  cursor: pointer;
}

.field[data-state="pass"] input,
.field[data-state="pass"] select  { border-color: var(--pass); }
.field[data-state="pass"] input:focus,
.field[data-state="pass"] select:focus { box-shadow: 0 0 0 3px rgba(0, 107, 45, 0.14); }

.field[data-state="fail"] input,
.field[data-state="fail"] select  { border-color: var(--fail); }
.field[data-state="fail"] input:focus,
.field[data-state="fail"] select:focus { box-shadow: 0 0 0 3px rgba(155, 27, 46, 0.14); }

.field[data-state="warn"] input,
.field[data-state="warn"] select  { border-color: var(--warn); }
.field[data-state="warn"] input:focus,
.field[data-state="warn"] select:focus { box-shadow: 0 0 0 3px rgba(176, 112, 0, 0.14); }

.msg {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  margin: 0;
  min-height: 1.2em;
  color: var(--ink-mute);
}
.msg.pass { color: var(--pass); }
.msg.fail { color: var(--fail); }
.msg.warn { color: var(--warn); }
.msg::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.16em;
  opacity: 0;
}
.msg.pass::before, .msg.fail::before, .msg.warn::before { opacity: 1; }

/* ============== ACTIONS ============== */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.btn-primary {
  font: inherit;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 0 22px;
  height: 44px;
  background: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 100ms;
  border-radius: 2px;
}
.btn-primary:hover  { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-primary:active { background: var(--accent-deep); }
.btn-primary:focus-visible { outline: 3px solid rgba(27, 45, 92, 0.28); outline-offset: 1px; }

.btn-ghost {
  font: inherit;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  height: 44px;
  padding: 0 16px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 100ms, background 100ms;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }

/* ============== REPORT ============== */

#report-section { margin-top: clamp(24px, 3vw, 36px); }

.report-empty {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 22px;
  color: var(--ink-mute);
  font-size: 14px;
}
.report-empty p { margin: 0; }

.report {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: clamp(20px, 3vw, 28px);
}

.report-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.report-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 14px;
}
.report-id {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.report-id [data-report-id] { font-family: var(--mono); font-weight: 500; color: var(--ink-soft); }
.report-meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0;
}

.summary {
  display: flex;
  gap: 28px;
  margin: 0;
}
.summary > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.summary dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.summary dd {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
.report-table th,
.report-table td {
  text-align: left;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  word-break: break-word;
}
.report-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
}
.report-table th:nth-child(1), .report-table td:nth-child(1) { width: 9ch; font-family: var(--mono); font-weight: 600; color: var(--ink); }
.report-table th:nth-child(2), .report-table td:nth-child(2) { width: 12ch; }
.report-table th:nth-child(4), .report-table td:nth-child(4) { font-family: var(--mono); font-size: 12px; color: var(--ink-mute); }

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.state::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.state.pass { color: var(--pass); }
.state.pass::before { background: var(--pass); }
.state.warn { color: var(--warn); }
.state.warn::before { background: var(--warn); }
.state.fail { color: var(--fail); }
.state.fail::before { background: var(--fail); }

/* ============== FOOTER ============== */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0 44px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: clamp(40px, 6vw, 60px);
}
.footer-note { margin: 0 0 14px 0; line-height: 1.55; max-width: 64ch; }
.footer-links {
  margin: 0;
  font-size: 12px;
  color: var(--ink-mute);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.footer-links .sep { color: var(--border-strong); }
.footer-links .muted { color: var(--ink-mute); }
.footer-links a { color: var(--ink); text-decoration-color: var(--border-strong); }
.footer-links a:hover { color: var(--accent-deep); text-decoration-color: var(--accent-deep); }

/* ============== RESPONSIVE ============== */

@media (max-width: 640px) {
  .fset .grid { grid-template-columns: 1fr; gap: 16px; }
  .field-narrow { max-width: none; }
  .report-meta-row { flex-direction: column; align-items: flex-start; }
}

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