@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #171210;
  --muted: #5a504c;
  --accent: #c8102e;
  --accent-dark: #9f0d25;
  --paper: #f8f6f3;
  --card: #fffdfb;
  --line: #d2cbc5;
  --silver: #b8aea6;
  --shadow: 0 24px 65px rgba(23, 18, 16, 0.11);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 85% -5%, rgba(200, 16, 46, 0.07), transparent 60%),
    radial-gradient(700px 500px at -10% 100%, rgba(23, 18, 16, 0.06), transparent 60%),
    var(--paper);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.55;
}

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.top {
  padding: 20px clamp(20px, 5vw, 56px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { height: 30px; width: auto; display: block; }
.brand-sub {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--card);
}

.wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.intro h1 {
  margin: 12px 0 8px;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.intro h1 em {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}
.intro p { margin: 0 0 24px; color: var(--muted); max-width: 44ch; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 5vw, 32px);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}
.tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  min-height: 44px;
  cursor: pointer;
}
.tab.is-active { background: var(--ink); color: var(--paper); }

.status { min-height: 1.5em; margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(200, 16, 46, 0.09);
  border: 1px solid rgba(200, 16, 46, 0.35);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.field input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.field input[aria-invalid="true"] { border-color: var(--accent); }
.hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.forgot { margin: -4px 0 18px; text-align: right; font-size: 14px; }
.forgot a { color: var(--accent-dark); font-weight: 700; }

.btn {
  display: block;
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  color: #fffdfb;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.55; cursor: wait; }

.notice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--muted);
}
.notice a { color: var(--accent-dark); font-weight: 700; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--silver);
  outline-offset: 3px;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px clamp(20px, 5vw, 56px) 28px;
  color: var(--muted);
  font-size: 14px;
}
.foot nav { display: flex; gap: 16px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent-dark); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 420px) {
  .wrap { padding-top: 8px; }
  .card { border-radius: 16px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

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