:root {
  --bg: #fafaf7;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --ink-faint: #8a8a85;
  --rule: #e8e8e0;
  --accent: #b85c2a;
  --max: 680px;
  --gap: clamp(1rem, 2vw, 1.5rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main, header, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

header {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

footer {
  margin-top: clamp(4rem, 10vw, 8rem);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 0.85rem;
  line-height: 1.5;
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--ink);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

p.lead {
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

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

a.email {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

li { margin-bottom: 0.4rem; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.tag {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.brand {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.app {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
}

.app:last-of-type { border-bottom: 1px solid var(--rule); }

.app h3 {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.app p {
  margin: 0;
  font-size: 0.95rem;
}

.legal-meta {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
  line-height: 1.7;
  margin-top: 1rem;
}

.legal-meta span { display: block; }

.back {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-decoration: none;
  margin-bottom: 2rem;
}

.back:hover { color: var(--ink); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --ink: #f0eee5;
    --ink-soft: #b8b6ad;
    --ink-faint: #7a7870;
    --rule: #2a2a23;
    --accent: #e08b50;
  }
}

.notice {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.4rem 0.45rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  z-index: 50;
  animation: notice-in 0.3s ease-out;
}

.notice-text { padding-right: 0.25rem; }

.notice-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.45rem;
  height: 1.5rem;
  cursor: pointer;
  border-radius: 999px;
  opacity: 0.6;
  transition: opacity 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.notice-close:hover,
.notice-close:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.notice.notice-hide {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .notice { animation: none; }
  .notice.notice-hide { transition: none; }
}

@media (max-width: 480px) {
  .notice {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}
