:root {
  --canvas: #f6f1e8;
  --surface: #fbf8f1;
  --surface-alt: #ebe2cf;
  --ink: #1f1a14;
  --ink-secondary: #3d352a;
  --muted: #756d5e;
  --rose: #c1625b;
  --rose-pressed: #a85d58;
  --rose-soft: #f4d9d5;
  --line: #d8cdbb;
  --error: #9b3434;
  --focus: #266f77;
  --radius: 8px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
}

.language-button,
.text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-intro {
  padding: 56px 0 36px;
  max-width: 720px;
}

.eyebrow,
.section-index {
  margin: 0 0 12px;
  color: var(--rose-pressed);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  max-width: 700px;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.04;
}

h2 {
  font-size: 28px;
  line-height: 1.2;
}

.intro-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--ink-secondary);
  font-size: 18px;
}

.letter-image {
  position: relative;
  margin: 0;
  height: clamp(190px, 31vw, 340px);
  overflow: hidden;
  border-block: 1px solid var(--line);
}

.letter-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  display: block;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 72px;
  padding: 64px 0 80px;
}

.consequences {
  align-self: start;
}

.consequences ul {
  margin: 28px 0 24px;
  padding: 0;
  list-style: none;
}

.consequences li {
  position: relative;
  padding: 16px 0 16px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-secondary);
}

.consequences li::before {
  position: absolute;
  left: 0;
  content: "—";
  color: var(--rose);
}

.fine-print,
.privacy-note {
  color: var(--muted);
  font-size: 14px;
}

.flow-panel {
  min-height: 480px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--surface-alt);
}

.flow-panel h2 + p {
  margin: 12px 0 28px;
  color: var(--ink-secondary);
}

.provider-actions {
  display: grid;
  gap: 12px;
}

.provider-button,
.delete-button {
  width: 100%;
  min-height: 52px;
  border-radius: 6px;
  font-weight: 700;
}

.provider-button {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.provider-button span:nth-child(2) {
  grid-column: 2;
}

.provider-mark {
  grid-column: 1;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.google-mark {
  color: #356c56;
}

.provider-button:hover {
  background: #fffdf8;
}

.privacy-note {
  margin: 20px 0 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--muted);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 50%, transparent);
  outline-offset: 3px;
}

.field-error,
.status-message {
  color: var(--error);
  font-size: 14px;
}

.field-error {
  margin: 8px 0 0;
}

.delete-button {
  margin-top: 24px;
  border: 1px solid var(--ink);
  background: var(--rose);
  color: var(--ink);
}

.delete-button:hover {
  background: var(--rose-pressed);
  color: #fff;
}

.delete-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.text-button {
  width: 100%;
  margin-top: 8px;
}

.result-view {
  text-align: center;
}

.result-mark {
  width: 56px;
  height: 56px;
  margin: 20px auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--rose-soft);
  font-size: 24px;
}

.purge-date {
  margin: 24px 0;
  padding: 16px;
  border-block: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 24px;
}

.config-error {
  padding-left: 20px;
  border-left: 3px solid var(--error);
}

.status-message {
  min-height: 24px;
  margin: 20px 0 0;
}

footer {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 1120px);
  }

  .page-intro {
    padding-top: 40px;
  }

  h1 {
    font-size: 42px;
  }

  .letter-image {
    height: 210px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 0 64px;
  }

  .flow-panel {
    order: -1;
    min-height: 0;
    padding: 24px;
    box-shadow: 6px 6px 0 var(--surface-alt);
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

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