:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #526273;
  --brand: #168aad;
  --brand-dark: #0b6682;
  --brand-soft: #eaf7fb;
  --line: #d9e2e8;
  --danger: #a51d2d;
  --danger-soft: #fff5f6;
  --surface: #fff;
  --canvas: #FFFFFF;
  --shadow: 0 8px 24px rgb(23 33 43 / 7%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: #FFFFFF; font: 16px/1.75 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #066b9b; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: #034f75; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 3px; }
.container { width: min(56rem, calc(100% - 2rem)); margin-inline: auto; }

.site-header { position: fixed; z-index: 20; top: 0; right: 0; left: 0; padding: .78rem 0; border-bottom: 1px solid #555; background: #333333; color: #FFFFFF; text-align: center; }
.site-header a { display: block; color: inherit; font-size: clamp(.92rem, 3.6vw, 1.1rem); font-weight: 750; line-height: 1.45; letter-spacing: .025em; text-decoration: none; overflow-wrap: anywhere; }
main { padding: calc(clamp(1.75rem, 5vw, 3rem) + 3.5rem) 0 7rem; background: #FFFFFF; }
h1, h2, h3 { color: #132c35; letter-spacing: .01em; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.75rem, 6vw, 2.55rem); line-height: 1.3; }
h2 { margin: clamp(2.5rem, 7vw, 3.75rem) 0 1rem; font-size: clamp(1.3rem, 4vw, 1.6rem); line-height: 1.4; }
h3 { margin: 0; font-size: clamp(1.08rem, 3vw, 1.25rem); line-height: 1.5; }

.panel, .news-item, .share-panel { border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); box-shadow: var(--shadow); }
.usage { padding: 1.25rem 1.5rem; }
.usage h1 { margin-bottom: .75rem; font-size: 1.35rem; }
.usage p { margin: .3rem 0; }
.notice { margin: 1rem 0 1.5rem; padding: .9rem 1rem; border: 1px solid #edc3c8; border-left: 4px solid var(--danger); border-radius: .5rem; background: var(--danger-soft); color: #861625; font-size: .95rem; font-weight: 650; line-height: 1.7; }

.search-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 1rem; align-items: end; padding: clamp(1rem, 4vw, 1.5rem); }
.usage, .search-section, .history-section { width: min(100%, 52rem); margin-inline: auto; }
.search-section { margin-top: 2rem; }
.field { display: grid; gap: .45rem; color: #263c46; font-size: .92rem; font-weight: 700; }
select { width: 100%; min-height: 3rem; padding: .62rem 2.25rem .62rem .8rem; border: 1px solid #8fa2ad; border-radius: .55rem; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
select:hover { border-color: var(--brand); }
select:disabled { background: #eef2f4; color: #687784; cursor: not-allowed; }
.search-button, .share-button { min-height: 3rem; border: 0; border-radius: .55rem; font: inherit; font-weight: 750; line-height: 1.3; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.search-button { padding: .68rem 1.65rem; background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgb(8 126 139 / 18%); }
.search-button:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); }
.search-button:active:not(:disabled), .share-button:active { transform: translateY(1px); }
.search-button:disabled { background: #778892; box-shadow: none; cursor: not-allowed; }
.search-help, .archive-intro { color: var(--muted); font-size: .95rem; }

.article-list { margin: 1.25rem 0 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); list-style: none; box-shadow: var(--shadow); }
.article-list li + li { border-top: 1px solid var(--line); }
.article-list a { display: block; padding: 1rem 1.15rem; font-weight: 700; text-decoration: none; }
.article-list a:hover { background: var(--brand-soft); }
.history-list { margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; list-style: none; }
.history-list li { display: flex; min-height: 3.25rem; align-items: center; gap: .65rem; padding: .35rem 1rem; background: #FFFFFF; }
.history-list li + li { border-top: 1px solid var(--line); }
.history-list a { display: flex; flex: 1; align-items: center; min-height: 2.5rem; font-weight: 700; text-decoration: none; }
.new-badge { flex: 0 0 auto; padding: .12rem .45rem; border-radius: 999px; background: #b42332; color: #FFFFFF; font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.status { padding: 1rem; border-radius: .55rem; background: #eaf0f3; color: #44545f; }
.status.error { background: var(--danger-soft); color: var(--danger); }

.news-item { margin-block: 1rem 1.5rem; padding: clamp(1.2rem, 4vw, 1.75rem); }
.news-title { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.news-detail { display: grid; grid-template-columns: 8.25rem minmax(0, 1fr); margin: 1.15rem 0 0; }
.news-detail dt, .news-detail dd { padding-block: .8rem; border-bottom: 1px solid #e8edef; }
.news-detail dt { position: relative; padding-left: .85rem; color: #29434d; font-size: .9rem; font-weight: 750; }
.news-detail dt::before { position: absolute; top: 1.04rem; bottom: 1.04rem; left: 0; width: 3px; border-radius: 2px; background: var(--brand); content: ""; }
.news-detail dd { margin: 0; color: #273641; }
.news-detail dd:last-child, .news-detail dt:nth-last-child(2) { border-bottom: 0; }
.news-outlook { padding: .8rem !important; border-radius: .35rem; background: var(--brand-soft); }
.news-source a { font-weight: 700; overflow-wrap: anywhere; }
.category-empty { margin: 1rem 0 1.5rem; padding: 1.1rem 1.25rem; border: 1px dashed #b9cbd4; border-radius: .75rem; background: #fff; color: var(--muted); }

.share-panel { margin-top: 3.5rem; padding: clamp(1.15rem, 4vw, 1.6rem); }
.share-panel h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.share-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.share-button { display: inline-flex; align-items: center; justify-content: center; padding: .65rem .85rem; color: #fff; text-align: center; text-decoration: none; }
.share-button:hover { color: #fff; box-shadow: 0 5px 12px rgb(23 33 43 / 16%); transform: translateY(-1px); }
.share-x { background: #202124; }
.share-x:hover { background: #000; }
.share-line { background: #07853d; }
.share-line:hover { background: #056c32; }
.share-copy { background: var(--brand); }
.share-copy:hover { background: var(--brand-dark); }
.share-status { min-height: 1.6em; margin: .7rem 0 0; color: var(--brand-dark); font-size: .9rem; font-weight: 700; text-align: center; }

.site-footer { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; padding: .55rem 0; border-top: 1px solid #cad5db; background: #333333; color: #FFFFFF; font-size: .9rem; box-shadow: 0 -3px 14px rgb(23 33 43 / 9%); backdrop-filter: blur(8px); }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer a { display: inline-flex; min-height: 2.5rem; align-items: center; padding: .3rem .9rem; border: 1px solid #FFFFFF; border-radius: .5rem; color: #FFFFFF; font-weight: 750; text-decoration: none; }
.site-footer a:hover { background: #4a4a4a; color: #FFFFFF; }
.site-footer small { font-size: .86rem; white-space: nowrap; }

@media (max-width: 40rem) {
  .container { width: min(100% - 1.25rem, 56rem); }
  main { padding-top: 4.75rem; }
  .site-header { padding-block: .68rem; }
  .search-form, .share-actions { grid-template-columns: 1fr; }
  .search-button, .share-button { width: 100%; }
  .news-detail { grid-template-columns: 1fr; }
  .news-detail dt { padding-bottom: .2rem; border-bottom: 0; }
  .news-detail dt::before { top: 1rem; bottom: .35rem; }
  .news-detail dd { padding: .25rem 0 .9rem .85rem; }
  .news-outlook { padding: .65rem .75rem !important; }
  .site-footer .container { gap: .5rem; }
  .site-footer small { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .search-button, .share-button { transition: none; }
}
