@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/manrope-400.ttf') format('truetype');
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/manrope-700.ttf') format('truetype');
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('./fonts/manrope-800.ttf') format('truetype');
}
:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #656565;
  --line: #dedede;
  --paper: #fff;
  --ground: #f5f5f5;
  font: 16px/1.5 Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
  scrollbar-color: #999 #eee;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
input { caret-color: var(--ink); }
input[type=checkbox] { accent-color: var(--ink); }
::selection { color: white; background: #333; }
:focus-visible, .choices input:focus-visible + span { outline: 2px solid #444; outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1320px, calc(100% - 96px)); margin-inline: auto; }
h1, h2, h3, p { margin-top: 0; }
.sr-only, .choices input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 4; left: 15px; top: 10px; padding: 10px; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
header { background: var(--ink); color: white; }
.header-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; gap: 9px; align-items: center; font-weight: 800; font-size: 1.65rem; letter-spacing: -.04em; text-decoration: none; }
.brand-symbol { width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; }
nav { display: flex; gap: 32px; }
nav a { font-size: .875rem; text-decoration: none; color: #ddd; }
nav a:hover { color: white; text-decoration: underline; }
.hero { padding-block: 42px 32px; }
.hero-heading { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-bottom: 32px; }
h1 { font-size: clamp(3rem, 7.3vw, 6rem); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; margin: 0; }
.hero-description p { font-size: 1.125rem; line-height: 1.55; margin-bottom: 9px; }
.hero-description span { color: var(--muted); font-size: .875rem; }
.search-shell { display: flex; align-items: center; gap: 20px; background: white; border: 1px solid #bdbdbd; border-radius: 12px; padding: 10px 20px; }
.search-shell label { font-size: .875rem; font-weight: 700; white-space: nowrap; padding-right: 20px; border-right: 1px solid var(--line); }
.search-shell input { width: 100%; min-width: 0; height: 44px; border: 0; background: transparent; padding: 8px 0; }
.search-shell input::placeholder { color: #686868; opacity: 1; }
.search-shell > span { flex-shrink: 0; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.catalog { padding-block: 26px 56px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h2 { font-size: 1.5rem; letter-spacing: -.03em; line-height: 1.2; margin-bottom: 0; font-weight: 800; }
.section-title p { margin: 0; font-size: .875rem; color: var(--muted); }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.filters { display: grid; gap: 24px; padding: 0 15px 20px 0; }
.filter-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.filter-head h3 { font-size: 1rem; margin: 0; }
.text-button { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend, .format-label { font-size: .875rem; font-weight: 700; margin-bottom: 10px; }
.format-label { margin-bottom: -15px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label { position: relative; cursor: pointer; }
.choices span { display: inline-flex; align-items: center; justify-content: center; min-width: 39px; min-height: 40px; padding: 7px 10px; border: 1px solid #c9c9c9; border-radius: 6px; background: white; font-size: .875rem; }
.choices input:checked + span { background: var(--ink); border-color: var(--ink); color: white; }
.choices label:hover span { border-color: #555; }
#subjects { display: grid; gap: 8px; }
#subjects label { display: flex; align-items: center; gap: 10px; }
#subjects input { position: static; clip-path: none; width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
#subjects span { min-height: 29px; justify-content: start; text-align: left; padding: 3px 0; background: transparent; border: 0; color: var(--ink); }
#subjects input:checked + span { background: transparent; color: var(--ink); font-weight: 700; }
#more-subjects { margin-top: 12px; }
select, #registry-query { min-height: 42px; width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid #c9c9c9; border-radius: 6px; background-color: white; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23171717' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 10px center; background-repeat: no-repeat; }
.saved-control { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 16px; font-size: .875rem; }
.saved-control label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.saved-control input { margin: 0; width: 16px; height: 16px; }
#saved-count { color: var(--muted); }
#save-feedback { margin: 0; color: var(--muted); }
.statuses { gap: 20px; border-bottom: 1px solid #ccc; }
.statuses span { min-height: 43px; border: 0; background: transparent; padding: 8px 0 12px; border-radius: 0; }
.statuses input:checked + span { background: transparent; color: var(--ink); box-shadow: inset 0 -3px var(--ink); font-weight: 700; }
.statuses small { margin-left: 7px; color: var(--muted); font-size: .8125rem; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 15px; }
.results-bar p { font-size: .875rem; color: var(--muted); margin: 0; }
.results-bar select { width: auto; max-width: 65%; font-size: .875rem; background-color: transparent; border: 0; }
#results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 18px; font-size: .875rem; }
.status { font-size: .8125rem; color: var(--muted); }
.status-open { color: var(--ink); font-weight: 700; }
.status-check { text-decoration: underline dotted; text-underline-offset: 4px; }
.card-format { white-space: nowrap; color: var(--muted); font-size: .8125rem; }
.card h3 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -.03em; margin-bottom: 10px; font-weight: 800; }
.organizer { font-size: .875rem; color: var(--muted); margin-bottom: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag { display: inline-block; padding: 3px 8px; font-size: .8125rem; border-radius: 4px; background: #f1f1f1; }
.award { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .875rem; line-height: 1.6; margin-bottom: 24px; color: #505050; }
.deadline { margin-top: auto; margin-bottom: 14px; font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: 9px 13px; min-height: 42px; background: white; border: 1px solid #c7c7c7; border-radius: 7px; text-decoration: none; font-size: .875rem; font-weight: 700; }
.button:hover { background: #ededed; border-color: #888; }
.actions a.button:first-child { color: white; background: var(--ink); border-color: var(--ink); }
.actions a.button:first-child:hover { background: #444; }
.save-button { min-height: 42px; margin-left: auto; padding: 8px 0 8px 5px; background: none; border: 0; font-size: .8125rem; color: var(--muted); }
.save-button[aria-pressed=true] { color: var(--ink); font-weight: 700; }
.save-button:hover { text-decoration: underline; text-underline-offset: 4px; }
#load-more { width: 100%; margin-top: 20px; background: transparent; min-height: 48px; }
.empty { grid-column: 1 / -1; padding: 32px; background: white; border-radius: 12px; }
.empty h3 { margin-bottom: 10px; }
#registry { border-top: 1px solid var(--line); }
.registry-intro { max-width: 75ch; color: var(--muted); margin-bottom: 20px; }
#registry-query { max-width: 500px; }
.checked { color: var(--muted); font-size: .875rem; margin-top: 16px; }
.registry-item { border-top: 1px solid var(--line); padding-block: 18px; }
.registry-item summary { line-height: 1.6; font-weight: 700; cursor: pointer; }
.registry-item ul { padding-left: 22px; }
.registry-item li { display: flex; justify-content: space-between; gap: 18px; margin-block: 12px; font-size: .875rem; }
.registry-item li span { flex-shrink: 0; color: var(--muted); }
.benefits { padding-block: 48px; background: #e9e9e9; }
.benefits-inner { display: grid; grid-template-columns: 1fr 1.7fr; gap: 50px; }
.benefits h2 { margin-bottom: 18px; }
.benefits p { color: #555; }
.benefit-items h3 { font-size: 1.1rem; margin-bottom: 8px; }
.benefit-items > div + div { border-top: 1px solid #ccc; padding-top: 20px; }
footer { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
footer p { margin: 0; color: var(--muted); font-size: .875rem; }
dialog { width: min(720px, calc(100% - 24px)); max-height: 90vh; padding: 28px; border: 0; border-radius: 16px; background: white; color: var(--ink); }
dialog::backdrop { background: #0008; }
body:has(dialog[open]) { overflow: hidden; }
.close { display: block; margin-left: auto; width: 42px; height: 42px; border: 1px solid #bbb; border-radius: 7px; background: white; font-size: 1.5rem; }
dialog h2 { margin-block: 20px; font-size: 1.65rem; line-height: 1.3; }
dialog dl { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
dialog dt { color: var(--muted); }
dialog dd { margin: 0; }
.filter-toggle { display: none; }
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 48px); }
  .layout { grid-template-columns: 190px minmax(0, 1fr); gap: 25px; }
  .card { padding: 20px; }
  #results { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; padding-block: 15px; gap: 12px; }
  .brand { font-size: 1.4rem; }
  nav { gap: 16px; }
  nav a { font-size: .8125rem; }
  .hero { padding-block: 30px 12px; }
  .hero-heading { display: grid; gap: 15px; margin-bottom: 22px; }
  h1 { font-size: clamp(2.5rem, 11vw, 3.8rem); }
  .hero-description p { font-size: 1rem; margin-bottom: 5px; }
  .hero-description p br { display: none; }
  .search-shell { padding: 13px 15px; flex-wrap: wrap; gap: 5px; }
  .search-shell label { border: 0; padding: 0; font-size: .8125rem; }
  .search-shell input { order: 3; flex-basis: 100%; font-size: .875rem; }
  .search-shell > span { margin-left: auto; font-size: .8125rem; }
  .catalog { padding-block: 25px 35px; }
  .section-title { flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .section-title h2 { font-size: 1.3rem; }
  .layout, .benefits-inner { grid-template-columns: 1fr; gap: 22px; }
  .filter-toggle { display: block; width: 100%; min-height: 44px; margin-bottom: 18px; background: white; border: 1px solid #bbb; border-radius: 7px; font-weight: 700; }
  .filters { display: none; padding: 20px; background: white; border-radius: 12px; }
  .filters.is-open { display: grid; }
  #subjects { grid-template-columns: 1fr 1fr; }
  .statuses { gap: 5px 16px; }
  .statuses span { min-height: 42px; font-size: .8125rem; }
  .results-bar { padding-block: 12px; }
  .card { padding: 21px; }
  .card h3 { font-size: 1.3rem; }
  .card-head { flex-wrap: wrap; gap: 5px; }
  .save-button { font-size: .8125rem; }
  .benefits { padding-block: 35px; }
  dialog { padding: 20px; }
  dialog dl { grid-template-columns: 1fr; gap: 6px; }
  dialog dd { margin-bottom: 12px; }
  footer { flex-wrap: wrap; padding-block: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button { transition: background-color 150ms ease-out; }
  dialog[open] { animation: detail-open 180ms ease-out; }
  @keyframes detail-open { from { transform: translateY(8px); } to { transform: translateY(0); } }
}
