/* WEAVR design system.

   Single stylesheet: the CSP is default-src 'none' with script-src 'none', so
   there is no inline <style>, no inline <script> and no JavaScript anywhere.
   Every colour, radius and spacing value below comes from the design tokens. */

@import url('fonts.css');

/* ── tokens: light ──────────────────────────────────────────────────── */

:root {
  /* brand */
  --violet-primary:     #5f4b8b;
  --violet-darker:      #453271;
  --violet-darkest:     #322159;

  /* accent */
  --blue-primary:       #2acaed;
  --blue-neon:          #09edf5;
  --blue-neon-lum:      #00f6ff;

  /* text */
  --black:              #110729;
  --text-heading:       #2A2353;
  --text-muted-purple:  #8A83A8;
  --text-subtle-purple: #667799;
  --grey-text:          #737373;
  --white:              #ffffff;

  /* surfaces */
  --surface-page:       #F5F6F8;
  --surface-elevated:   #FCFCFF;
  --surface-alt:        #f7f7f7;
  --grey-background:    #f8f8f8;
  --icon-background:    #f1eff6;

  /* borders */
  --grey-light:         #e5e5e5;
  --grey-lighter:       #ebebeb;
  --grey-darker:        #cbcbcb;

  /* status */
  --green:              #23b46a;
  --red:                #ff6464;
  --red-deep:           #dd4444;
  --error-bg:           #FEE2E2;
  --error-text:         #B42318;

  /* transparent derivatives */
  --transp-violet:      rgba(95, 75, 139, 0.08);
  --transp-blue:        rgba(9, 237, 245, 0.12);
  --red-transparent:    rgba(255, 100, 100, 0.67);
  /* Destructive button fill. The translucent wash only works over a light
     surface: composited over the dark page it drops the dark label to
     2.96:1, so the dark theme swaps in the full-strength red. */
  --destructive-bg:     var(--red-transparent);
  --yellow-highlight:   rgba(242, 180, 91, 0.38);

  /* elevation — cards and tables use borders, not shadows */
  --shadow-dropdown: 0px 8px 16px 4px rgba(0, 0, 0, 0.25);

  --radius: 4px;
}

/* ── tokens: dark ───────────────────────────────────────────────────── */

:root[data-theme="dark"] {
  --violet-primary:     #9080d8;
  --black:              #e8e8f0;
  --white:              #1e1e2e;
  --surface-page:       #141420;
  --surface-elevated:   #1e1e35;
  --surface-alt:        #1a1a28;
  --grey-background:    #0f0f1a;
  --grey-text:          #a8a8c8;
  --grey-light:         #2a2a3f;
  --grey-lighter:       #252535;
  --grey-darker:        #4a4a6a;
  --text-heading:       #d0c8f8;
  --text-muted-purple:  #9994b5;
  --text-subtle-purple: #8899cc;
  --icon-background:    #1e1e35;
  --error-bg:           rgba(180, 35, 24, 0.12);
  --error-text:         #ff8080;
  --destructive-bg:     var(--red);
}

/* The dark tokens also follow the operating system when no theme is pinned.
   A manual toggle would need JavaScript, which the CSP does not allow. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --violet-primary:     #9080d8;
    --black:              #e8e8f0;
    --white:              #1e1e2e;
    --surface-page:       #141420;
    --surface-elevated:   #1e1e35;
    --surface-alt:        #1a1a28;
    --grey-background:    #0f0f1a;
    --grey-text:          #a8a8c8;
    --grey-light:         #2a2a3f;
    --grey-lighter:       #252535;
    --grey-darker:        #4a4a6a;
    --text-heading:       #d0c8f8;
    --text-muted-purple:  #9994b5;
    --text-subtle-purple: #8899cc;
    --icon-background:    #1e1e35;
    --error-bg:           rgba(180, 35, 24, 0.12);
    --error-text:         #ff8080;
    --destructive-bg:     var(--red);
  }
}

/* ── base ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font: 16px 'Nunito Sans', sans-serif;
  line-height: 1.25;
  color: var(--black);
  background: var(--surface-page);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Electrolize', sans-serif;
  font-weight: bold;
  text-transform: none;
  color: var(--text-heading);
  margin: 0;
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.33; }
h3 { font-size: 18px; line-height: 1.4; }
h4 { font-size: 16px; line-height: 1.4; }

p { margin: 0; }

a { color: var(--violet-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: none;
  box-shadow: 0 0 4px 0 var(--blue-neon);
  border-radius: var(--radius);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-subtle-purple);
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { border-radius: 2px; background: rgba(203, 203, 203, 0.25); }
::-webkit-scrollbar-thumb { border-radius: 2px; background: var(--grey-darker); }

/* ── shell ──────────────────────────────────────────────────────────── */

.topbar {
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background-color: var(--violet-darkest);
  background-image: linear-gradient(135deg, #0e0e1c 0%, #1a1235 50%, #0e1628 100%);
}

/* The top bar keeps its dark background in both themes, so its text is
   literally white: var(--white) inverts to a dark surface in the dark theme
   and would make the wordmark vanish. */
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Electrolize', sans-serif;
  font-size: 20px;
  line-height: 1.4;
  color: #ffffff;
  text-decoration: none;
}

.topbar .brand:hover { color: var(--blue-primary); text-decoration: none; }

.brand-mark {
  display: inline-block;
  width: 8px;
  height: 20px;
  border-radius: 2px;
  background: var(--blue-primary);
}

.topbar-actions { display: flex; align-items: center; gap: 16px; }

.topbar-user { font-size: 14px; line-height: 1.4; color: #ffffff; }

.inline-form { display: inline-flex; margin: 0; }

.content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-head p:not(.kpi) {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--grey-text);
}

/* ── card ───────────────────────────────────────────────────────────── */

.card {
  background: var(--surface-elevated);
  border: 1.5px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 32px;
}

.card + .card { margin-top: 24px; }

.section-title {
  margin: 0 0 12px;
  font-family: 'Electrolize', sans-serif;
  font-size: 20px;
  font-weight: normal;
  line-height: 1.4;
  color: var(--text-heading);
}

/* Spacing between sections lives here rather than in empty spacer elements. */
.card > * + .section-title { margin-top: 24px; }

.muted { color: var(--grey-text); font-size: 14px; line-height: 1.4; }
.caption { color: var(--text-muted-purple); font-size: 12px; line-height: 1.4; }

/* ── forms ──────────────────────────────────────────────────────────── */

/* Who the identity server says is submitting. Not editable, so it is a line of
   text rather than a field. */
.signed-in {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-subtle-purple);
}
.signed-in strong { color: var(--black); }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}

.required { color: var(--red); }

.input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--grey-light);
  border-radius: var(--radius);
  transition: border-color .3s;
}

textarea { min-height: 96px; resize: vertical; }

.input:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover { border-color: rgba(95, 75, 139, 0.38); }

.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--violet-primary);
  outline: none;
  box-shadow: none;
}

input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--grey-light);
  border-radius: var(--radius);
}

input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 12px;
  padding: 0 16px;
  font-family: 'Electrolize', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--violet-primary);
  background: var(--transp-violet);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: .3s;
}

input[type="file"]::file-selector-button:hover { background: rgba(69, 50, 113, 0.16); }

/* Five file boxes stacked at the form's normal spacing would run off the
   screen, so the rows are tightened and the caption sits beside the control. */
.upload-slots { display: flex; flex-direction: column; gap: 8px; }

.upload-slot { display: flex; align-items: center; gap: 12px; }

.upload-slot input[type="file"] { flex: 0 1 380px; min-height: 40px; padding: 8px 12px; }

.upload-slot .caption { flex: 1 1 auto; }

/* ── screenshot picker (upgraded by upload.js) ───────────────────────── */

/* The real input still submits the files; it is only moved out of sight, not
   hidden from assistive technology or disabled. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  background: var(--surface-alt);
  border: 1.5px dashed var(--grey-light);
  border-radius: var(--radius);
  transition: .2s ease;
}

.dropzone.is-dragging {
  background: var(--transp-violet);
  border-color: var(--violet-primary);
}

.dropzone.is-full { opacity: .6; }

.dropzone-main {
  font-family: 'Electrolize', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-heading);
}

.dropzone-sub { font-size: 12px; line-height: 1.4; color: var(--text-muted-purple); }

.dropzone-problem { margin: 12px 0 0; }

.file-list { list-style: none; margin: 12px 0 0; padding: 0; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
}

.file-item + .file-item { margin-top: 8px; }

.file-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--icon-background);
  flex: 0 0 auto;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.file-name {
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One line for the four single-file boxes instead of the same caption repeated
   beside each of them. */
.slots-divider {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted-purple);
}

@media (max-width: 767px) {
  .upload-slot { flex-direction: column; align-items: stretch; gap: 4px; }
  .upload-slot input[type="file"] { flex: 1 1 auto; }
}

.hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted-purple);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

/* ── buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 20px;
  font-family: 'Electrolize', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  text-transform: none;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: .3s;
}

.btn:hover { text-decoration: none; }

.btn-primary { background: var(--violet-primary); color: #fff; }
.btn-primary:hover { background: var(--violet-darker); }
.btn-primary:active { background: var(--violet-darkest); box-shadow: none; }
.btn-primary:focus-visible {
  outline: none;
  border: 1px solid var(--violet-primary);
  box-shadow: 0 0 8px 0 rgba(69, 50, 113, 0.24);
}
.btn-primary:disabled { background: var(--transp-violet); pointer-events: none; }

.btn-secondary { background: var(--transp-violet); color: var(--violet-primary); }
.btn-secondary:hover { background: rgba(69, 50, 113, 0.16); }
.btn-secondary:disabled { color: var(--grey-text); background: rgba(95, 75, 139, 0.013); }

.btn-destructive { background: var(--destructive-bg); color: rgba(17, 7, 41, 0.76); }
.btn-destructive:hover { background: rgba(255, 100, 100, 0.46); color: var(--black); }
.btn-destructive:focus-visible {
  outline: none;
  border: 1px solid var(--red-deep);
  box-shadow: 0 0 8px 0 rgba(221, 68, 68, 0.24);
}

.btn-small { min-height: 32px; padding: 0 16px; font-size: 14px; }

/* dark-surface variant: cyan drives the action, never violet */
.btn-on-dark {
  min-height: 52px;
  padding: 6px 34px;
  background: var(--blue-primary);
  color: var(--black);
}
.btn-on-dark:hover { background: var(--blue-neon); }
.btn-on-dark:active { background: var(--blue-neon-lum); }
.btn-on-dark:focus-visible {
  outline: none;
  border: 1px solid var(--blue-neon);
  box-shadow: 0 0 8px 0 rgba(0, 246, 255, 0.24);
}
.btn-on-dark:disabled { color: #fff; opacity: .2; }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.08); }

/* ── alerts ─────────────────────────────────────────────────────────── */

.alert {
  margin-bottom: 20px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  border-radius: var(--radius);
}

.alert ul { margin: 0; padding-left: 20px; }
.alert li + li { margin-top: 4px; }

.alert-success {
  background: rgba(35, 180, 106, 0.12);
  border: 1px solid var(--green);
  color: var(--black);
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--red);
  color: var(--error-text);
}

/* Not an error: nothing went wrong, the form is simply waiting for a signed-in
   WEAVR link. --yellow-highlight is translucent, so it sits correctly on both
   the light and the dark surface. */
.alert-warning {
  background: var(--yellow-highlight);
  border: 1px solid var(--grey-darker);
  color: var(--black);
}

.alert p { margin: 0; }
.alert p + p { margin-top: 6px; }

/* on the dark auth panel the light-surface alerts would disappear */
.alert-on-dark {
  background: rgba(255, 100, 100, 0.16);
  border: 1px solid var(--red);
  color: #fff;
}

.alert-info-on-dark {
  background: var(--transp-blue);
  border: 1px solid var(--blue-primary);
  color: #fff;
}

/* ── table ──────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  height: 56px;
  padding: 0 16px;
  text-align: left;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-muted-purple);
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--grey-light);
}

.data-table td {
  height: 56px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.4;
  vertical-align: middle;
  border-bottom: 1px solid var(--grey-light);
}

.data-table tbody tr:hover { background: var(--grey-background); }

/* Truncation is a CSS concern: slicing the string server-side to fit would
   mean cutting already-escaped HTML. */
.col-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-title a { font-weight: 600; color: var(--violet-primary); }

.col-author {
  width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--grey-text);
}

.col-ref { width: 148px; }
.col-count { width: 116px; }
.col-date { width: 200px; color: var(--grey-text); white-space: nowrap; }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--violet-primary);
  background: var(--transp-violet);
  border-radius: var(--radius);
}

.chip-empty { color: var(--grey-text); background: var(--grey-lighter); }

.empty-state {
  padding: 48px 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: var(--grey-text);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--grey-light);
}

.tab {
  padding: 12px 0;
  font-family: 'Electrolize', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--grey-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.tab:hover { color: var(--violet-primary); text-decoration: none; }
.tab.active { color: var(--violet-primary); border-bottom-color: var(--violet-primary); }

/* ── report detail ──────────────────────────────────────────────────── */

.page-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.action-row { display: flex; align-items: flex-start; gap: 12px; }

/* The confirmation step is a <details>: native open/close, no script, which is
   what the CSP allows. The <summary> is styled as a button and the marker is
   removed so it does not read as a disclosure triangle. */
.confirm-delete { position: relative; }

.confirm-delete > summary {
  list-style: none;
  user-select: none;
}
.confirm-delete > summary::-webkit-details-marker { display: none; }
.confirm-delete > summary::marker { content: ""; }

.confirm-box {
  position: absolute;
  right: 0;
  z-index: 10;
  width: 320px;
  margin-top: 8px;
  padding: 16px;
  text-align: left;
  background: var(--surface-elevated);
  border: 1.5px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
}

.confirm-question {
  margin-bottom: 8px;
  font-family: 'Electrolize', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-heading);
}

.confirm-box .caption { display: block; margin-bottom: 16px; }
.confirm-box form { margin: 0; }

/* Full-strength --yellow as text on a light surface sits at about 1.9:1, which
   is unreadable. The documented badge pattern -- status colour as a wash behind
   normal text -- keeps the warning legible using only existing tokens. */
.warn-badge {
  margin: 0;
  padding: 4px 8px;
  text-align: right;
  color: var(--black);
  background: var(--yellow-highlight);
  border-radius: var(--radius);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--grey-light);
}

.meta-grid div { margin: 0; }

.meta-grid dt {
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted-purple);
}

.meta-grid dd { margin: 0; font-size: 14px; line-height: 1.4; }

.kpi {
  font-family: 'Electrolize', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.33;
  color: var(--text-heading);
}

/* User text keeps its line breaks through CSS. Converting newlines to <br> in
   the template would require |safe, which is how stored XSS gets in. */
.report-body {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--black);
  background: var(--surface-alt);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.screenshot-grid figure {
  margin: 0;
  overflow: hidden;
  background: var(--surface-alt);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
}

.screenshot-grid img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--icon-background);
}

.screenshot-grid figcaption {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted-purple);
  border-top: 1px solid var(--grey-light);
}

.tech-details { margin-top: 24px; }

.tech-details summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: 'Electrolize', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--grey-text);
  cursor: pointer;
}

.tech-details summary:hover { color: var(--violet-primary); }
.tech-details .meta-grid { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* ── hero / auth ────────────────────────────────────────────────────── */

/* The deep-violet radial with cyan accents is the brand signature. */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background-image: radial-gradient(circle at 53% 40%, #291567, #0a0a12 214%);
}

.hero-panel { width: 100%; max-width: 420px; }

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-family: 'Electrolize', sans-serif;
  font-size: 20px;
  line-height: 1.4;
  color: #fff;
}

.hero h1 { margin-bottom: 8px; color: #fff; }
.hero .muted { color: rgba(255, 255, 255, 0.64); }
.hero .field label { color: #fff; }

.hero input[type="email"],
.hero input[type="password"],
.hero input[type="text"] {
  height: 52px;
  min-height: 52px;
  padding: 16px 12px;
  color: #fff;
  background: var(--transp-blue);
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.hero input[type="email"]:hover,
.hero input[type="password"]:hover { background: rgba(9, 237, 245, 0.2); }

.hero input[type="email"]:focus,
.hero input[type="password"]:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 4px 0 var(--blue-neon);
  outline: none;
}

.hero form { margin-top: 32px; }
.hero .alert { margin-top: 24px; margin-bottom: 0; }
.hero .form-actions { margin-top: 24px; }
.hero .btn-on-dark { width: 100%; }

.hero-footer {
  margin-top: 24px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.48);
}

.hero-footer a { color: var(--blue-primary); }
.hero-footer a:hover { color: var(--blue-neon); }

/* ── confirmation ───────────────────────────────────────────────────── */

.confirm-card { max-width: 520px; margin: 0 auto; text-align: center; }
.confirm-card h1 { margin-bottom: 12px; }

.confirm-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  font-family: 'Electrolize', sans-serif;
  font-size: 24px;
  line-height: 48px;
  color: var(--green);
  background: rgba(35, 180, 106, 0.12);
  border-radius: var(--radius);
}

/* No inline style attributes anywhere: style-src is 'self', so they would be
   blocked by the CSP. */
.confirm-label { margin-top: 24px; }

.reference-code {
  margin: 16px 0 8px;
  padding: 16px;
  font-family: 'Electrolize', sans-serif;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.08em;
  color: var(--text-heading);
  background: var(--surface-alt);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
}

.confirm-card .form-actions { justify-content: center; margin-top: 24px; }

/* ── error page ─────────────────────────────────────────────────────── */

.error-card { max-width: 520px; margin: 0 auto; text-align: center; }

.error-status {
  margin-bottom: 8px;
  font-family: 'Electrolize', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.33;
  color: var(--text-muted-purple);
}

.error-card .muted { margin-top: 8px; }
.error-card .form-actions { justify-content: center; }

/* ── responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1365px) {
  .content { padding: 20px; }
  .topbar { padding: 0 20px; }
}

@media (max-width: 1023px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .card { padding: 20px; }
  .hero { padding: 20px; }
  h1 { font-size: 24px; line-height: 1.33; }
}

@media (max-width: 767px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .col-ref, .col-count, .col-author { display: none; }
  .topbar-user { display: none; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; }
}
