:root {
  color-scheme: light;
  --bg: #f5efe2;
  --bg-accent: #d9c39a;
  --card: rgba(255, 251, 244, 0.94);
  --line: rgba(23, 33, 57, 0.12);
  --ink: #172139;
  --muted: #55627b;
  --accent: #174f6b;
  --accent-soft: #d9edf8;
  --sand: #ead8b0;
  --success: #176047;
  --success-soft: #d7efe2;
  --warn: #9f5f0c;
  --warn-soft: #f4e3c6;
  --danger: #8a2c2c;
  --danger-soft: #f7d7d7;
  --shadow: 0 18px 60px rgba(23, 33, 57, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 35%),
    radial-gradient(circle at top right, rgba(217, 237, 248, 0.5), transparent 28%),
    linear-gradient(160deg, var(--bg), var(--bg-accent));
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
}

body,
button,
.pill,
.support,
.stack,
.facts,
code,
.hero-note,
.mini-label,
.status-panel,
.history,
.icon-button {
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.card {
  margin-top: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -100px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 79, 107, 0.18), transparent 70%);
  pointer-events: none;
}

.watermark {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--danger);
  background: var(--danger-soft);
}

.watermark.small {
  margin-bottom: 8px;
}

.eyebrow,
.mini-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

h1,
h2,
p,
dl {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(2.3rem, 10vw, 4.7rem);
  line-height: 0.93;
  letter-spacing: -0.05em;
  max-width: 10ch;
}

h2 {
  font-size: 1.2rem;
}

.lede {
  margin-top: 16px;
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.hero-grid > * {
  min-width: 0;
}

.hero-note {
  margin-top: 6px;
  font-size: 0.96rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.pill.muted {
  background: var(--warn-soft);
  color: var(--warn);
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.facts div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

dd {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.stack,
.status-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.support {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

button {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  background: white;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(23, 33, 57, 0.08);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary {
  color: white;
  background: linear-gradient(135deg, #172139, #174f6b);
}

.secondary {
  background: linear-gradient(135deg, #eddcb5, #dcc091);
}

.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.success {
  background: linear-gradient(135deg, #176047, #2d8d68);
}

.danger {
  color: var(--danger);
  box-shadow: inset 0 0 0 1px rgba(138, 44, 44, 0.18);
}

.wide {
  margin-top: 18px;
}

.sheet {
  width: min(100% - 24px, 760px);
  padding: 0;
  border: none;
  border-radius: 26px;
  background: transparent;
}

.sheet::backdrop {
  background: rgba(16, 26, 46, 0.58);
  backdrop-filter: blur(8px);
}

.sheet-card {
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.82), transparent 30%),
    linear-gradient(180deg, #fdf8ef, #f5ebd8);
  border: 1px solid rgba(23, 33, 57, 0.12);
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(16, 26, 46, 0.24);
}

.icon-button {
  width: auto;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(23, 33, 57, 0.06);
}

.status-panel {
  grid-template-columns: 1fr;
}

.status-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 33, 57, 0.08);
}

.status-strong {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.wide-card {
  grid-column: 1 / -1;
}

.history {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-actions {
  margin-top: 16px;
}

@media (min-width: 720px) {
  .shell {
    padding-top: 28px;
  }

  .hero-grid,
  .status-panel,
  .actions,
  .modal-actions,
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sheet-card {
    padding: 24px;
  }
}
