:root {
  color-scheme: light;
  --ink: #151d22;
  --muted: #617079;
  --line: #d7dfdf;
  --panel: #ffffff;
  --paper: #f4f8f7;
  --accent: #16866f;
  --accent-strong: #0b5346;
  --gold: #ac7a31;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; }
a { color: inherit; }

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(21, 29, 34, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fbf7ee;
  color: var(--accent-strong);
  font-family: Georgia, serif;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a { text-decoration: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 680;
}

.button.secondary {
  background: white;
  color: var(--accent-strong);
  border-color: var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(42px, 7vw, 86px) clamp(20px, 5vw, 72px) 40px;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.archive-visual {
  min-height: 390px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.34)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='560' viewBox='0 0 760 560'%3E%3Crect width='760' height='560' fill='%23edf5f3'/%3E%3Cg fill='%23ffffff' stroke='%23c5d4d1'%3E%3Crect x='92' y='98' width='190' height='312'/%3E%3Crect x='125' y='132' width='80' height='12' fill='%23151d22' opacity='.86'/%3E%3Crect x='125' y='170' width='120' height='8' fill='%23617079' opacity='.5'/%3E%3Crect x='125' y='194' width='92' height='8' fill='%23617079' opacity='.38'/%3E%3Crect x='125' y='238' width='116' height='92' fill='%23fbf7ee'/%3E%3Crect x='125' y='360' width='120' height='8' fill='%23617079' opacity='.38'/%3E%3Crect x='318' y='72' width='112' height='362'/%3E%3Crect x='354' y='108' width='40' height='220' fill='%2316866f' opacity='.14'/%3E%3Crect x='462' y='112' width='112' height='322'/%3E%3Crect x='494' y='148' width='48' height='190' fill='%23ac7a31' opacity='.14'/%3E%3Crect x='596' y='146' width='72' height='288'/%3E%3C/g%3E%3Cg stroke='%2316866f' stroke-width='4' opacity='.72' fill='none'%3E%3Cpath d='M112 456h548'/%3E%3Cpath d='M190 456c34-88 88-112 154-72s116 40 174-28 94-72 132-18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.band { padding: 44px clamp(20px, 5vw, 72px); }
.section-title { margin: 0 0 22px; font-size: 26px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
}

.card h2,
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p,
.meta { margin: 0; color: var(--muted); line-height: 1.6; }
.login-panel { max-width: 520px; }
.form { display: grid; gap: 12px; }

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
}

.footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid rgba(21, 29, 34, 0.08);
  font-size: 13px;
}

.notice {
  display: none;
  margin: 0 0 14px;
  color: #9b1c1c;
  font-weight: 680;
}

body:has([name="auth-invalid"]) .notice { display: block; }

@media (max-width: 860px) {
  .hero,
  .grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .archive-visual { min-height: 260px; }
  .footer { flex-direction: column; }
}
