:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --text: #1e2422;
  --muted: #66716d;
  --line: #d8d2c4;
  --paper: #fffdf8;
  --ink: #0f3d3e;
  --accent: #b9502b;
  --accent-2: #2f6f73;
  --shadow: 0 18px 45px rgba(30, 36, 34, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 56px 0 34px;
  background: linear-gradient(135deg, #113f41 0%, #1f5f61 52%, #8d462e 100%);
  color: #fffdf8;
}

.header-grid {
  max-width: 760px;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.kicker {
  margin: 0 0 12px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.88rem;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.86);
  font-size: 1.08rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 36px 0 18px;
  border-bottom: 1px solid var(--line);
}

.toolbar h2,
.guide h2,
.empty-state h2 {
  margin-bottom: 4px;
  font-size: 1.45rem;
  line-height: 1.3;
}

.toolbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

input,
button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  font: inherit;
}

input {
  width: min(300px, 44vw);
  padding: 8px 12px;
}

button {
  padding: 8px 14px;
  cursor: pointer;
}

button:hover,
button:focus-visible,
input:focus-visible {
  border-color: var(--accent-2);
  outline: 2px solid rgba(47, 111, 115, 0.18);
  outline-offset: 2px;
}

.handout-list {
  display: grid;
  gap: 14px;
  padding: 22px 0 42px;
}

.handout {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.date {
  color: var(--accent);
  font-weight: 700;
}

.handout h3 {
  margin: 0 0 4px;
  font-size: 1.22rem;
  line-height: 1.4;
}

.handout p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 42px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fffdf8;
  text-decoration: none;
}

.open-link:hover,
.open-link:focus-visible {
  background: #174e50;
  outline: 2px solid rgba(15, 61, 62, 0.22);
  outline-offset: 2px;
}

.empty-state {
  margin: 0 0 48px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
}

code {
  padding: 0.1em 0.35em;
  background: rgba(47, 111, 115, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 42px;
  }

  .toolbar,
  .actions,
  .handout {
    display: block;
  }

  .actions {
    margin-top: 16px;
  }

  input,
  button {
    width: 100%;
    margin-top: 10px;
  }

  .handout {
    padding: 18px;
  }

  .date,
  .open-link {
    margin-top: 12px;
  }

  .open-link {
    width: 100%;
  }
}
