:root {
  --paper: #f3efe6;
  --ink: #20201d;
  --muted: #6f6b62;
  --line: #cbc4b5;
  --card: rgba(255, 253, 247, 0.82);
  --accent: #b6462f;
  --accent-dark: #8e3423;
  --shadow: 0 22px 70px rgba(57, 48, 34, 0.1);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 86% 12%, rgba(182, 70, 47, 0.12), transparent 28rem),
    linear-gradient(rgba(32, 32, 29, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 100% 4rem, auto;
}

a { color: inherit; }

.site-head {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

main {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 80px;
}

.intro { max-width: 720px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(25px, 4vw, 34px);
}

.intro > p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.panel {
  margin-top: 48px;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
  gap: 52px;
  align-items: start;
}

.muted, .status { color: var(--muted); }

form { display: grid; gap: 18px; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  color: var(--ink);
  background: #fffdf8;
  font: inherit;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(182, 70, 47, 0.12);
}

button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button:disabled { cursor: wait; opacity: 0.62; }

.panel-head {
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
}

.button-quiet, .copy-button {
  min-height: 36px;
  padding: 0 13px;
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.button-quiet:hover, .copy-button:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.search-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 26px;
  gap: 10px;
}

.status { min-height: 24px; margin: 18px 0 0; }
.status[data-kind="error"] { color: #a12f22; }

.results { display: grid; gap: 32px; margin-top: 28px; }

.result-group h3 {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-list { display: grid; gap: 10px; }

.result-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.48);
}

.result-card a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--accent-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

.result-note { margin-bottom: 10px; line-height: 1.65; }

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.password-row {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}

.copy-button { min-height: 30px; }

.notice {
  margin-top: 28px;
  padding-left: 16px;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.notice strong { color: var(--ink); }
.notice p { margin: 4px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
[hidden] { display: none !important; }

@media (max-width: 680px) {
  .site-head, main { width: min(100% - 28px, 900px); }
  main { padding-top: 46px; }
  h1 { font-size: clamp(40px, 13vw, 58px); }
  .auth-panel { grid-template-columns: 1fr; gap: 24px; }
  .search-form { grid-template-columns: 1fr; }
  .search-form button { width: 100%; }
  .panel { margin-top: 34px; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel { animation: rise 420ms ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}
