:root {
  color-scheme: dark;
  --background: #0c131e;
  --surface: #131f2c;
  --raised: #182737;
  --outline: #34465a;
  --ink: #eef5fa;
  --muted: #b0beca;
  --accent: #7de3c9;
  --accent-strong: #a1f1dd;
  --amber: #ffd698;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--background); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button, input, select, textarea { min-height: 2.75rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shell { width: min(72rem, calc(100% - 4rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--outline); }
.topbar { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.25rem; font-weight: 720; }
.brand-mark {
  width: 1.65rem;
  height: 1.65rem;
  position: relative;
  display: inline-block;
  border: 1px solid #3c786e;
  border-radius: .5rem;
  background: #182e34;
}
.brand-mark::before {
  content: '';
  position: absolute;
  width: .27rem;
  height: .27rem;
  inset: .42rem auto auto .38rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: .62rem 0 var(--accent), .31rem .54rem var(--accent);
  z-index: 1;
}
.brand-mark::after {
  content: '';
  width: .62rem;
  height: .62rem;
  position: absolute;
  inset: .51rem auto auto .5rem;
  border: 1px solid #62a698;
  border-radius: 50%;
}
.home-link { color: var(--muted); font-size: .95rem; }
.home-link:hover { color: var(--accent); }

.intro { padding-block: clamp(3rem, 9vw, 6rem) 2.5rem; }
.intro h1 { margin: 0; font-size: clamp(2.35rem, 5.5vw, 4.4rem); font-weight: 740; line-height: 1.06; letter-spacing: -.055em; }
.intro p { margin: .95rem 0 0; color: var(--muted); max-width: 38rem; font-size: 1.1rem; }

.handoff, .manual-copy {
  background: var(--surface);
  border: 1px solid #4a9384;
  border-radius: .9rem;
  padding: 1.25rem;
  margin-block: 0 1.5rem;
}
.handoff { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.handoff h2, .handoff p, .manual-copy p { margin: 0; }
.handoff h2 { font-size: 1.125rem; }
.handoff p, .manual-copy p { color: var(--muted); }
.handoff button, .card button {
  color: var(--accent-strong);
  background: #1a343a;
  border: 1px solid #3b7269;
  border-radius: .5rem;
  padding: .55rem .9rem;
  font-size: .95rem;
  font-weight: 630;
}
.handoff button:hover, .card button:hover { background: #284b4b; }

.sections { display: flex; gap: .25rem; border-bottom: 1px solid var(--outline); }
.sections button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: .65rem 1.25rem;
  color: var(--muted);
  font-weight: 640;
}
.sections button:hover { color: var(--ink); }
.sections button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.controls { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.25rem .8rem; }
.search { flex: 1 1 15rem; }
.controls input, .controls select, textarea {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: .5rem;
  padding: .62rem .85rem;
}
.controls input, textarea { width: 100%; }
.controls input::placeholder { color: var(--muted); }
.controls select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, #b0beca 50%), linear-gradient(135deg, #b0beca 50%, transparent 50%);
  background-position: right 1.21rem center, right .93rem center;
  background-size: .3rem .3rem;
  background-repeat: no-repeat;
}
.summary, .notice { color: var(--muted); font-size: .9rem; margin-block: 0 1rem; }
.notice { color: var(--amber); }

.grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  padding: 0;
  margin: 0;
  gap: 1rem;
}
.grid:empty { display: none; }
.card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-width: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: .85rem;
}
.card h2, .card p, .card ul { margin: 0; overflow-wrap: anywhere; }
.card h2 { font-size: 1.35rem; line-height: 1.22; letter-spacing: -.025em; }
.card p, .card ul { color: var(--muted); }
.card .meta { font-size: .875rem; }
.card ul { padding-inline-start: 1.25rem; }
.card .actions { margin-top: auto; padding-top: .45rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.card .actions select { padding: .45rem; max-width: 100%; border: 1px solid var(--outline); border-radius: .5rem; background: var(--raised); color: var(--ink); }
.tag { align-self: flex-start; padding: .18rem .55rem; border-radius: .35rem; background: var(--raised); color: var(--accent); font-size: .875rem; font-weight: 590; }
.tag.restricted { color: var(--amber); }
.empty { text-align: center; background: var(--surface); border: 1px solid var(--outline); border-radius: .85rem; padding: clamp(1.5rem, 6vw, 4rem) 1rem; }
.empty h2 { margin: 0 0 .3rem; font-size: 1.25rem; font-weight: 680; }
.empty p { margin: 0; color: var(--muted); }
.manual-copy { margin-block: 1rem 0; }
.manual-copy label { color: var(--accent); font-weight: 630; }
.manual-copy textarea { display: block; margin-top: .75rem; resize: vertical; font-family: ui-monospace, monospace; }
footer { margin-block: 2rem; padding-block: 1rem; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--outline); }
.visually-hidden { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 38rem) {
  .shell { width: calc(100% - 2rem); }
  .topbar { min-height: 3.75rem; }
  .sections button { flex: 1; padding-inline: .65rem; }
  .handoff { align-items: flex-start; flex-direction: column; }
}
