:root {
  color-scheme: light;
  --ink: #151515;
  --paper: #f1eee7;
  --paper-soft: #e5e1d8;
  --muted: #69645c;
  --line: rgba(21, 21, 21, 0.18);
  --line-light: rgba(241, 238, 231, 0.2);
  --accent: #c84a2f;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button, input { font: inherit; }

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  width: 100%;
  height: 84px;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-name b { font: inherit; }

.header-label {
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 650;
}

.stage {
  display: grid;
  min-height: calc(100svh - 84px);
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.92fr);
  background: var(--paper);
}

.modal {
  display: flex;
  min-height: calc(100svh - 84px);
  max-width: 780px;
  flex-direction: column;
  justify-content: center;
  padding: 54px 6vw 66px 5vw;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 42px;
}

.section-label span,
.section-label p,
.preview-caption span,
.preview-stamp span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.section-label span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}

.section-label p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(50px, 6vw, 82px);
  font-weight: 430;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

h1 strong { display: block; font-weight: 680; }

.accent-rule {
  width: 72px;
  height: 3px;
  margin: 30px 0 24px;
  background: var(--accent);
}

.intro {
  max-width: 610px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.intro strong { color: var(--ink); font-weight: 650; }

.error {
  max-width: 610px;
  margin: -10px 0 24px;
  padding: 13px 15px;
  border: 1px solid rgba(200, 74, 47, 0.32);
  border-left: 3px solid var(--accent);
  color: #8f2f1f;
  background: rgba(200, 74, 47, 0.06);
  font-size: 13px;
  line-height: 1.45;
}

form {
  display: grid;
  max-width: 610px;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
}

label { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
label[for="username"] { grid-column: 1; grid-row: 1; }
label[for="password"] { grid-column: 2; grid-row: 1; }
.field { margin-bottom: 24px; }
.field:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.field:nth-of-type(2) { grid-column: 2; grid-row: 2; }

input {
  width: 100%;
  height: 48px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(21, 21, 21, 0.42);
  border-radius: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  transition: border-color 0.18s ease;
}

input:focus { border-color: var(--accent); }

button {
  display: flex;
  grid-column: 1 / -1;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--paper);
  background: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

button:hover { color: var(--ink); background: transparent; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button span { font-size: 21px; font-weight: 400; }

.missing .intro { margin-bottom: 22px; }

.missing-detail {
  max-width: 610px;
  margin: 0 0 26px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  background: var(--paper-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.action-button {
  display: flex;
  width: 100%;
  max-width: 610px;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--paper);
  background: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.action-button:hover { color: var(--ink); background: transparent; }
.action-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.action-button span { font-size: 21px; font-weight: 400; }

.privacy {
  display: flex;
  max-width: 610px;
  align-items: center;
  gap: 9px;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.privacy span { color: var(--accent); font-weight: 800; }

.preview-shell {
  position: relative;
  min-height: calc(100svh - 84px);
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--ink);
}

.preview-board {
  position: absolute;
  inset: 7.5% 6% 7.5% 7.5%;
  overflow: hidden;
  border: 1px solid rgba(241, 238, 231, 0.28);
  background: #d8d4cb;
  transform: rotate(-1.5deg);
}

.preview-nav {
  display: flex;
  height: 66px;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(21, 21, 21, 0.18);
  background: #efebe3;
}

.preview-nav span { width: 128px; height: 12px; margin-right: auto; background: var(--ink); }
.preview-nav i { width: 50px; height: 7px; background: rgba(21, 21, 21, 0.26); }

.preview-copy {
  position: absolute;
  top: 27%;
  left: 8%;
  display: grid;
  width: 54%;
  gap: 13px;
}

.preview-copy b { display: block; width: 100%; height: 43px; background: var(--ink); }
.preview-copy b:nth-child(2) { width: 78%; }
.preview-copy span { display: block; width: 84%; height: 8px; margin-top: 5px; background: rgba(21, 21, 21, 0.24); }
.preview-copy span:last-child { width: 62%; margin-top: -4px; }

.preview-card {
  position: absolute;
  right: -9%;
  bottom: -6%;
  width: 50%;
  height: 54%;
  border: 16px solid var(--paper);
  background:
    linear-gradient(90deg, transparent 48%, rgba(21,21,21,.14) 49% 51%, transparent 52%),
    linear-gradient(rgba(21,21,21,.12) 49%, transparent 50%),
    var(--paper-soft);
  background-size: 100% 100%, 100% 28px, auto;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.preview-stamp {
  position: absolute;
  z-index: 2;
  top: 30px;
  right: 28px;
  display: flex;
  gap: 6px;
  padding: 9px;
  background: var(--ink);
}

.preview-stamp span {
  padding: 5px 7px;
  border: 1px solid var(--line-light);
  color: var(--paper);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.preview-caption {
  position: absolute;
  z-index: 2;
  right: 5%;
  bottom: 28px;
  left: 8%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-left: 4px solid var(--accent);
  background: var(--paper);
}

.preview-caption span {
  max-width: 145px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.preview-caption strong { max-width: 230px; font-size: 18px; line-height: 1.18; text-align: right; }

.footer {
  position: fixed;
  z-index: 4;
  right: 22px;
  bottom: 12px;
  margin: 0;
  color: rgba(241, 238, 231, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .site-header { height: 72px; padding: 0 22px; }
  .header-label { padding: 10px 12px; font-size: 11px; }
  .stage { min-height: calc(100svh - 72px); grid-template-columns: 1fr; }
  .modal { min-height: auto; max-width: none; padding: 54px 7vw 64px; }
  .preview-shell { min-height: 520px; border-top: 1px solid var(--line); border-left: 0; }
  .footer { position: absolute; }
}

@media (max-width: 560px) {
  .site-header { padding: 0 18px; }
  .header-label { border: 0; padding: 0; color: var(--muted); font-size: 9px; text-transform: uppercase; }
  .modal { padding: 42px 22px 52px; }
  .section-label { align-items: flex-start; margin-bottom: 34px; }
  h1 { max-width: 350px; font-size: clamp(48px, 14vw, 64px); }
  .accent-rule { width: 48px; height: 2px; margin: 25px 0 22px; }
  .intro { font-size: 15px; line-height: 1.55; }
  form { grid-template-columns: 1fr; }
  label[for="username"], label[for="password"], .field:nth-of-type(1), .field:nth-of-type(2) { grid-column: 1; grid-row: auto; }
  .field { margin-bottom: 22px; }
  button { grid-column: 1; }
  .preview-shell { min-height: 390px; }
  .preview-board { inset: 7% -12% 8% 6%; }
  .preview-stamp span:nth-child(2) { display: none; }
  .preview-caption { right: 18px; bottom: 18px; left: 18px; align-items: flex-start; flex-direction: column; }
  .preview-caption strong { text-align: left; }
  .footer { display: none; }
}

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