/*
 * The whole stylesheet. Served from this origin, versioned with the page, and
 * loading nothing — no font host, no CDN, no @import. `default-src 'none'`
 * with `style-src 'self'` and `font-src 'none'` means an added webfont would
 * fail visibly rather than quietly becoming a third-party dependency inside
 * the cryptographic boundary.
 *
 * The accent and feedback tones are the same values as the rest of the estate
 * (`sm4rt-web`'s theme: accent #4A90D9, hover #3B82C4, the light alert tones).
 * Copied as VALUES on purpose — this page must not import a design system.
 */

:root {
  --accent: #4a90d9;
  --accent-hover: #3b82c4;
  --ink: #1a1a1a;
  --muted: #5f6b76;
  --line: #dde3e9;
  --page: #f4f6f8;
  --card: #ffffff;
  --error-bg: #fdecea;
  --error-border: #f5c6c0;
  --error-ink: #b03a2e;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.shell {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ----------------------------------------------------------------- brand -- */

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.brand-logo {
  display: block;
  width: 180px;
  max-width: 60%;
  height: auto;
}

/* ------------------------------------------------------------------ card -- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

/* The job details under the heading. */
.job {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: var(--page);
  border-radius: 4px;
}

.job-caption {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.job-label {
  font-weight: 600;
  /* Technician-typed and set with textContent, but one very long unbroken
     string should still not push the card wider than the viewport. */
  overflow-wrap: anywhere;
}


.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.message {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.fine {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ------------------------------------------------------------------ form -- */

.label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 7rem;
}

textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.4rem 0 1rem;
}

.button {
  appearance: none;
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
}

.button:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.button-secondary {
  color: var(--accent);
  background: transparent;
  margin-top: 1rem;
}

.button-secondary:hover:not(:disabled) {
  background: #eef4fb;
  border-color: var(--accent-hover);
}

/* -------------------------------------------------------------- renewals -- */

.ok-note {
  margin: 0 0 1.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  background: #eef7ee;
  border: 1px solid #bfe0bf;
  font-size: 0.95rem;
}

.items {
  display: grid;
  gap: 1rem;
}

.item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.item-name {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.item-facts {
  margin: 0 0 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  font-size: 0.93rem;
}

.item-decision {
  margin: 0 0 0.4rem;
  font-weight: 600;
  color: var(--accent);
}

.item .muted {
  margin: 0 0 0.6rem;
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
}

.actions .button-secondary {
  margin-top: 0;
}

/* Domains: "No longer need the domain?" and Questions, below the item cards. */
.domain-expire,
.questions {
  margin-top: 1.25rem;
}

.expire-heading {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.expire-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.expire-text p {
  margin: 0;
}

.expire-domain {
  font-weight: 600;
}

.expire-row .button-secondary {
  margin-top: 0;
  width: auto;
}

.faq {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

.faq p {
  margin: 0.4rem 0 0;
}

input[type="number"] {
  width: 10rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

input[type="number"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

textarea {
  margin-bottom: 1rem;
}

/* ----------------------------------------------------------------- alert -- */

.alert {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.alert-error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-ink);
}

/* The platform honours `hidden` unless something overrides display; these rules
   set display on .card and .button, so say it explicitly. */
[hidden] {
  display: none !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9edf1;
    --muted: #9aa7b4;
    --line: #2c353e;
    --page: #14191e;
    --card: #1c232a;
    --error-bg: #3a201d;
    --error-border: #6b332c;
    --error-ink: #f3b4ac;
  }

  .button-secondary:hover:not(:disabled) {
    background: #22303d;
  }

  .ok-note {
    background: #1d2e20;
    border-color: #35553a;
  }
}
