:root {
  --ink: #202937;
  --muted: #566176;
  --line: #e0e4eb;
  --blue: #205dcb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; line-height: 1.55; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; flex: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #3a73e6; outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0;
  clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap;
}
.skip:focus { position: absolute; z-index: 2; padding: .7rem; background: #fff; }
.shell { margin-inline: auto; width: calc(100% - clamp(32px, 6.2vw, 84px)); }
.container { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-inner { min-height: 86px; }
.brand { font-size: 1.48rem; font-weight: 750; letter-spacing: -.055em; white-space: nowrap; }
.brand span { color: var(--blue); }
.header nav, .footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(12px, 2vw, 26px); }
.header nav a { font-size: .93rem; white-space: nowrap; }
.header nav a:hover, .header nav a[aria-current=page], footer a:hover { color: var(--blue); text-decoration: underline; }
footer { background: #f5f6fa; color: var(--muted); }
.footer-inner { min-height: 62px; padding-block: 12px; }
.footer-inner a, .footer-inner small { font-size: .87rem; }

.home { padding: clamp(60px, 17vh, 175px) 0 42px; }
.home-search { width: min(600px, calc(100% - 40px)); margin-inline: auto; text-align: center; }
.home-search h1 { margin-bottom: 22px; font-size: clamp(3.35rem, 8vw, 5.35rem); line-height: 1.1; font-weight: 750; letter-spacing: -.063em; }
.search { display: flex; align-items: center; gap: 10px; max-width: 600px; }
.search-home { display: block; }
.search-field {
  display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0;
  min-height: 56px; padding: 0 20px; border: 1px solid #dce1ea;
  border-radius: 999px; background: #fff; color: var(--muted);
}
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px #205dcb26; }
.search-field svg { width: 19px; height: 19px; }
.search-field input { min-width: 0; width: 100%; padding: 12px 0; color: var(--ink); background: transparent; border: 0; outline: none; }
.search-field input::placeholder { color: var(--muted); }
.search-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.search button, .search-actions a, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  border: 1px solid transparent; border-radius: 8px; padding: 7px 14px; font-weight: 600; font-size: .9rem;
}
.search button, .button { background: var(--blue); color: #fff; }
.search button:hover, .button:hover { background: #174cae; }
.search-actions a { background: #f2f4f8; color: var(--ink); }
.search-actions a:hover { border-color: #dce1ea; background: #e9edf5; }
.crumb a:hover, .reading a:hover { text-decoration: underline; }
.topic-section { margin-top: clamp(28px, 5vw, 46px); }
.section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-bottom:18px}.section-heading h2{font-size:clamp(1.45rem,2.4vw,1.87rem);letter-spacing:-.04em;line-height:1.2}.categories,.guide-grid{display:grid;gap:16px}.categories{grid-template-columns:repeat(4,minmax(0,1fr))}.category-card{display:flex;align-items:flex-start;gap:12px;padding:18px 14px;background:white;border:1px solid var(--line);border-radius:13px;transition:border-color .2s,transform .2s}.category-card:hover,.guide-card:hover{border-color:#8195df;transform:translateY(-2px)}.category-card strong{font-size:.97rem;display:block;margin-bottom:3px}.category-card strong+span{color:var(--muted);display:block;font-size:.88rem;line-height:1.4}.category-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:9px;flex:none}.category-icon svg{width:21px;height:21px}
.blue{--accent:#2347c4;--soft:#e7edff;--cover:#a9bfff}.orange{--accent:#913d17;--soft:#ffeddd;--cover:#ffd0a4}.purple{--accent:#673ab7;--soft:#f0e8ff;--cover:#d8c3ff}.green{--accent:#12644d;--soft:#e0f7ee;--cover:#a0e3d0}.category-icon{background:var(--soft);color:var(--accent)}.guide-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.guide-card{display:flex;background:white;border:1px solid var(--line);border-radius:13px;overflow:hidden;transition:border-color .2s,transform .2s}.guide-card>a{display:flex;flex-direction:column;flex:1}.guide-card>a:focus-visible{outline-offset:-3px}.guide-cover{min-height:135px;display:grid;place-items:center;color:var(--accent);background:radial-gradient(circle at 50% 47%,var(--soft) 0 22%,transparent 23% 37%,#ffffff55 38% 38.6%,transparent 39% 50%,#ffffff55 51% 51.5%,transparent 52%),linear-gradient(120deg,var(--soft),var(--cover));}.guide-cover svg{width:48px;height:48px;stroke-width:1.3}.guide-info{padding:18px 20px;display:flex;flex:1;flex-direction:column;align-items:flex-start}.eyebrow{font-weight:750;color:var(--accent);font-size:.83rem}.guide-info h3{font-size:1.21rem;line-height:1.26;letter-spacing:-.03em;margin-top:.42rem}.guide-info p{font-size:.96rem;color:var(--muted);margin:.52rem 0 .9rem}.guide-info small{margin-top:auto;color:#566580}
.inner,.article-page{padding-block:44px 64px}.inner-intro{max-width:750px;margin-bottom:28px}.inner-intro .category-icon,.article-heading .category-icon{margin-bottom:14px}.inner h1,.article-heading h1{font-size:clamp(2.3rem,5vw,4rem);letter-spacing:-.058em;line-height:1.03}.inner-intro p,.article-heading p{font-size:1.13rem;color:var(--muted);margin-top:.8rem}.reading{max-width:760px}.reading section,.source{margin-top:27px}.reading h2{line-height:1.25;letter-spacing:-.023em;font-size:1.35rem;margin-bottom:7px}.reading p{color:var(--muted);max-width:68ch}.reading a{color:var(--blue)}.crumb{display:flex;flex-wrap:wrap;gap:.5rem;color:var(--muted);margin-bottom:22px;font-size:.93rem}.article-heading{padding:26px 26px 22px;background:white;border:1px solid var(--line);border-radius:15px}.article-heading small{display:block;margin-top:.65rem;color:var(--muted)}.source{padding:16px;background:#e9eef8;border-radius:9px}.related{margin:38px 0 0}.search-count{color:var(--muted);margin:14px 0 17px}

@media (max-width: 1000px) {
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .brand { font-size: 1.2rem; }
  .header nav a { font-size: .85rem; }
  .header-inner { gap: 10px; }
  .footer-inner { flex-wrap: wrap; gap: 8px 16px; }
  .categories, .guide-grid { grid-template-columns: 1fr; gap: 10px; }
  .category-card { padding: 12px; }
  .guide-cover { min-height: 108px; }
  .article-heading { padding: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.category-card small { display: block; margin-top: 5px; font-size: .82rem; color: var(--muted); }
.list-count { color: var(--muted); margin: 0 0 14px; }
.catalog-repeat { margin-top: 18px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 25px; }
.pagination a, .pagination button, .pagination span[aria-current] { min-width: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.pagination a, .pagination button { background: #fff; color: var(--blue); }
.pagination button:disabled { opacity: .5; cursor: default; }
.pagination span[aria-current] { background: var(--blue); color: #fff; }
.search-results { max-width: 760px; padding: 0; list-style: none; }
.search-results li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.search-results small, .search-results p { color: var(--muted); }
.search-results h2 { font-size: 1.16rem; }
.search-results a { color: var(--blue); }
.search-results a:hover { text-decoration: underline; }
.article-photo { display: block; width: 100%; max-height: 440px; object-fit: contain; margin-top: 22px; border-radius: 12px; }
.article-body { white-space: pre-line; }
.history-archive, .history-day { max-width: 930px; }
.history-shortcuts { display: flex; flex-wrap: wrap; gap: 9px; margin-block: 20px; }
.history-shortcuts a, .history-days a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
}
.history-shortcuts a:hover, .history-days a:hover { background: #edf3ff; text-decoration: underline; }
.history-months { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.history-month, .history-section {
  padding: clamp(14px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 13px;
  scroll-margin-top: 16px;
}
.history-month h2, .history-section h2 { font-size: 1.34rem; line-height: 1.43; }
.history-days { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.history-days a { width: 100%; padding-inline: 0; }
.history-day-nav { justify-content: space-between; }
.history-section { margin-block: 16px; }
.history-section h2 small { color: var(--muted); font-weight: 500; }
.history-section ul { padding-left: 1.35rem; }
.history-section li + li { margin-top: 7px; }
.history-license h2 { font-size: 1.16rem; }
.history-license p { margin-block: 6px; }
.history-license a { color: var(--blue); text-decoration: underline; }
@media (max-width: 720px) {
  .history-months { grid-template-columns: 1fr; }
}
@media (max-width: 550px) {
  .header-inner { flex-wrap: wrap; gap: 6px 16px; padding-block: 12px; }
}
.biography-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.biography-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.biography-card a { display: block; height: 100%; }
.biography-card a:hover h2 { color: var(--blue); text-decoration: underline; }
.biography-card a:focus-visible { outline-offset: -3px; }
.biography-card-image { display: grid; place-items: center; height: 190px; padding: 10px; background: #f1f3f8; }
.biography-card-image img { display: block; width: 100%; height: 170px; object-fit: contain; }
.biography-card-copy { padding: 16px 20px 20px; }
.biography-card-copy h2 { font-size: 1.17rem; line-height: 1.3; }
.biography-card-copy p { margin-top: 6px; color: var(--muted); }
.biography-role { color: var(--muted); font-size: .9rem; font-weight: 650; }
.biography-page .reading { max-width: 850px; }
.biography-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,220px); align-items: start; gap: 24px; }
.biography-heading h1 { margin: 7px 0 12px; font-size: clamp(2rem,5vw,3.45rem); letter-spacing: -.055em; line-height: 1.08; }
.biography-heading figure { margin: 0; }
.biography-heading img { display: block; width: 100%; height: auto; max-height: 290px; object-fit: contain; object-position: top; background: #f1f3f8; border-radius: 10px; }
.biography-heading figcaption { margin-top: 6px; font-size: .83rem; color: var(--muted); }
.biography-heading a, .biography-outline a, .biography-sources a { text-decoration: underline; overflow-wrap: anywhere; }
.biography-outline { margin-top: 22px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 9px; }
.biography-outline summary { cursor: pointer; font-weight: 650; }
.biography-page section p + p { margin-top: .8rem; }
@media (max-width: 760px) {
  .biography-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .biography-grid, .biography-heading { grid-template-columns: 1fr; }
  .biography-heading figure { width: min(100%, 220px); }
}
.contact-page { max-width: 850px; }
.contact-form { display: grid; gap: 17px; }
.contact-fields { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.contact-form label { display: block; font-weight: 550; }
.contact-form input:not([type=hidden]), .contact-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  min-height: 46px; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; font: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form .contact-check { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.contact-form .contact-check input { width: 82px; margin: 0; }
.contact-form .button { justify-self: start; min-height: 45px; }
.contact-note { color: var(--muted); }
.contact-notice, .contact-message { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; }
.contact-notice.success { background: #eaf7ee; color: #184f2a; }
.contact-notice.error { background: #fff0ef; color: #7d2222; }
.contact-message h2 { font-size: 1.16rem; }
.contact-message p { margin-top: 7px; overflow-wrap: anywhere; }
@media (max-width: 380px) { .contact-fields { grid-template-columns: 1fr; } }
.dashboard-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.dashboard-nav a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--blue); }
.dashboard-nav a[aria-current] { background: #edf3ff; font-weight: 650; }
.stats-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.stat-item { min-width: 0; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--line); }
.stat-item h2 { font-size: 1rem; }
.stat-item strong { display: block; font-size: clamp(1.35rem,3vw,2rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-item small, .stats-update { color: var(--muted); }
.stats-update { margin-top: 12px; }
.stats-topics { margin-top: 32px; }
.stats-topics .section-heading a, .stats-table a { color: var(--blue); }
.stats-topics a:hover { text-decoration: underline; }
.stats-table { overflow-x: auto; }
.stats-table table { width: 100%; border-collapse: collapse; }
.stats-table th, .stats-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 10px; }
.stats-table tbody th { font-weight: 550; overflow-wrap: anywhere; }
.stats-table :is(td,th):last-child { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .stats-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
