:root {
  color-scheme: light;
  --bg: #e7f0ea;
  --ink: #14241e;
  --muted: #4d6258;
  --line: #d5e4db;
  --card: #f7fbf8;
  --pine: #12352c;
  --accent: #e35d2f;
  --accent-dark: #c2410c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -12%, rgba(227, 93, 47, 0.18), transparent 28%),
    var(--bg);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
}

::selection { background: #f3c7b6; }

a { color: var(--pine); }

a:hover { color: var(--accent-dark); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: white;
  padding: 0.4rem 0.7rem;
  z-index: 3;
}

.skip:focus { top: 0.6rem; }

.banner {
  margin: 0;
  padding: 0.75rem 1.2rem;
  background: #fff3d6;
  color: #6d4710;
  text-align: center;
}

.banner a { color: #6d4710; font-weight: 700; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.4rem;
  background: var(--pine);
  color: #f4faf6;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f4faf6;
  font-family: var(--serif);
  font-size: 1.45rem;
  text-decoration: none;
}

.top-side {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-note {
  margin: 0;
  color: #d5e6dc;
  font-size: 0.95rem;
}

.langs {
  display: flex;
  gap: 0.45rem;
}

.langs a {
  color: #d5e6dc;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.langs a.is-current {
  color: #fff;
  border-bottom: 2px solid #ffb088;
}

.lamp {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #ffb088;
  box-shadow: 0 0 0 0 rgba(255, 176, 136, 0.7);
  animation: pulse 2.4s ease-out infinite;
}

.shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.4rem 0 3.2rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

h1, h2, .letter h2 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 { margin: 0.2rem 0 0.8rem; font-size: clamp(2.4rem, 5vw, 4.3rem); }

.eyebrow, .letter-kicker {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede { font-size: 1.12rem; color: var(--ink); }

.hero-copy form, .add-form {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.4rem;
  padding: 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 22px;
}

label { font-weight: 700; margin-top: 0.45rem; }

input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid #b7cdc2;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.hint, .quiet, .meta, .letter-meta, .foot, .top-note {
  color: var(--muted);
}

.hint, .quiet { margin: 0.15rem 0 0.35rem; font-size: 0.92rem; }

button, .button {
  display: inline-block;
  width: fit-content;
  margin-top: 0.8rem;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .button:hover { background: var(--accent-dark); color: white; }

button:disabled { opacity: 0.65; cursor: wait; }

.ghost {
  background: transparent;
  color: var(--pine);
  border: 1px solid #b7cdc2;
}

.ghost:hover { background: white; color: var(--accent-dark); }

.form-note:empty { display: none; }

.form-note, .notice {
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #e7f6ee;
  color: #145233;
}

.form-note.is-error, .notice.is-error {
  background: #fde8ec;
  color: #8d1230;
}

.form-note p { margin: 0.2rem 0; }
.form-note a, .notice a { display: inline-block; margin-top: 0.35rem; font-weight: 700; }
.watch h2 { overflow-wrap: anywhere; }

.letter, .panel, .mail {
  background: #fffdf8;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(18, 53, 44, 0.08);
}

.letter {
  padding: 1.5rem 1.4rem 1.2rem;
  transform: rotate(1.15deg);
}

.letter h2, .mail h2 { margin: 0.35rem 0; font-size: 2rem; }

.letter-back {
  margin-bottom: 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  color: #1f6b45;
  font-weight: 700;
}

.steps { margin-top: 3rem; }

.steps h2 { margin-bottom: 1rem; font-size: 2rem; }

.steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.steps li {
  list-style: none;
  padding: 1rem 1.05rem 1.15rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.steps ol { counter-reset: step; }

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.8rem;
}

.panel { padding: clamp(1.2rem, 3vw, 2.2rem); background: var(--card); border: 1px solid var(--line); }

.result-list { padding-left: 1.2rem; }

.watch-list { margin: 1rem 0 0; padding: 0; }

.watch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.watch h2 { margin: 0; font-size: 1.45rem; }

.watch-head { display: flex; flex-wrap: wrap; gap: 0.55rem 0.8rem; align-items: center; }

.url, .meta { margin: 0; overflow-wrap: anywhere; }

.watch form { margin: 0; }

.watch .ghost { margin-top: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.is-up { background: #e5f5eb; color: #145233; }
.is-down { background: #fde8ec; color: #8d1230; }
.is-wait, .is-pending { background: #fff3d6; color: #6d4710; }
.is-paused { background: #ece7e2; color: #5c5148; }

.add-form { margin-top: 1.4rem; }
.add-form h2 { margin: 0 0 0.2rem; font-size: 1.6rem; }

.mail-stack { display: grid; gap: 1rem; }
.mail { padding: 1.1rem 1.2rem 1.2rem; }
.mail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: 0.98rem;
}
.mail-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.mail-actions .button { margin-top: 0; }

.foot {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  font-size: 0.92rem;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .hero, .steps ol { grid-template-columns: 1fr; }
  .letter { transform: none; }
  .top, .top-side { align-items: flex-start; flex-direction: column; }
  .watch { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .lamp { animation: none; }
  .letter { transform: none; }
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(255, 176, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 176, 136, 0); }
}
