:root {
  color-scheme:light;
  --canvas:#f5f5f7;
  --surface:#fff;
  --ink:#1d1d1f;
  --muted:#515158;
  --blue:#06c;
  --blue-soft:#edf5ff;
  --line:#e1e1e7;
}
*,*::before,*::after { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; background:var(--canvas); color:var(--ink); font:500 1rem/1.52 -apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif; }
h1,h2,h3,p,ul,dl,dd { margin:0; }
h1,h2,h3,p { word-break:keep-all; overflow-wrap:anywhere; }
h1,h2,h3 { line-height:1.17; letter-spacing:-.055em; }
h1 { font-weight:780; font-size:clamp(2rem,4.7vw,4rem); }
h2 { font-weight:760; font-size:clamp(1.28rem,2.5vw,1.75rem); }
h3 { font-size:1.04rem; font-weight:760; }
a { color:var(--blue); text-underline-offset:.2em; }
input,select,button { font:inherit; color:inherit; }
button,summary,select { cursor:pointer; }
button:disabled { cursor:default; opacity:.55; }
:focus-visible { outline:3px solid #1474e1; outline-offset:3px; }
.wrap { width:min(calc(100% - 36px),1112px); margin-inline:auto; }
.sr-only { position:absolute; overflow:hidden; width:1px; height:1px; padding:0; margin:-1px; border:0; white-space:nowrap; clip-path:inset(50%); }
.skip { position:fixed; z-index:3; inset:8px auto auto 10px; border-radius:6px; padding:9px; background:var(--ink); color:#fff; }
.skip:not(:focus) { clip-path:inset(50%); }
.top { background:#fafafc; border-bottom:1px solid var(--line); }
.nav-row { min-height:64px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 14px; }
.brand { display:inline-flex; align-items:center; gap:8px; color:var(--ink); text-decoration:none; font-size:1.01rem; font-weight:810; letter-spacing:-.04em; }
.brand img { display:block; border-radius:9px; }
nav { display:flex; align-items:center; flex-wrap:wrap; gap:2px; }
nav a { display:inline-block; color:#36363a; padding:7px 10px; text-decoration:none; border-radius:999px; font-size:.88rem; font-weight:680; }
nav a:hover,nav a[aria-current] { background:var(--blue-soft); color:#004c9b; }
.main { margin-block:22px 34px; min-width:0; }
.main > * + * { margin-top:15px; }
.hero { background:#f1efec; border:1px solid #e4e0db; border-radius:27px; min-height:365px; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.28fr); overflow:hidden; }
.hero-copy { padding:clamp(23px,4vw,51px); align-self:center; }
.hero h1 { font-size:clamp(2rem,4.2vw,3rem); }
.hero h1 span { display:block; }
.hero p { margin-top:15px; color:#3f3d3a; font-size:1.045rem; }
.hero-photo { width:100%; height:100%; min-height:365px; display:block; object-fit:cover; object-position:70% center; }
.button { display:inline-flex; min-height:44px; align-items:center; justify-content:center; padding:8px 16px; font-size:.945rem; font-weight:750; line-height:1.3; border:1px solid transparent; border-radius:999px; text-decoration:none; }
.primary { color:#fff; background:var(--blue); border-color:var(--blue); }
.primary:hover { background:#0052a5; border-color:#0052a5; }
.subtle { background:#f6f7f9; border-color:#d9dde3; color:#192338; }
.subtle:hover { background:#e8eff8; }
.hero .button,.intro .button { margin-top:19px; }
.share-row { display:flex; justify-content:flex-end; min-width:0; }
.intro,.panel { min-width:0; padding:clamp(15px,3.65vw,29px); border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.intro { padding:clamp(20px,4vw,43px); background:#eaf2fa; border-color:#d8e4f0; }
.intro h1 { font-size:clamp(1.92rem,4.55vw,3.2rem); margin-top:7px; }
.intro p:not(.category-link) { color:#414b5d; margin-top:10px; }
.category-link a { font-size:.9rem; font-weight:750; }
.workspace { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(0,1fr); gap:13px; align-items:start; scroll-margin-top:14px; }
.lede,.field-note,.result-note { color:var(--muted); }
.lede { margin-top:6px; }
.field-grid { margin-top:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 13px; align-items:start; }
.field { min-width:0; display:grid; gap:5px; }
.field > span,.period-group legend { font-size:.9rem; font-weight:780; }
.field small { color:#565760; font-size:.81rem; line-height:1.36; word-break:keep-all; }
.field input,.field select { width:100%; min-width:0; margin:0; padding:8px 9px; min-height:44px; border:1px solid #bfc3cc; border-radius:10px; background:#fbfcfe; font-weight:530; }
.field select { appearance:none; padding-inline-end:29px; background-image:linear-gradient(45deg,transparent 49%,#404858 50%),linear-gradient(135deg,#404858 49%,transparent 50%); background-size:6px 6px; background-position:right 15px center,right 9px center; background-repeat:no-repeat; }
.check { display:flex; align-items:flex-start; gap:7px; font-size:.9rem; font-weight:700; margin-top:14px; line-height:1.4; }
.check input { margin:3px 0 0; accent-color:var(--blue); }
.field-note,.result-note { font-size:.89rem; margin-top:7px; }
.actions { display:flex; align-items:center; flex-wrap:wrap; margin-top:14px; gap:7px; }
.error { margin-top:9px; color:#9b2738; font-size:.91rem; font-weight:720; }
.error:empty { display:none; }
.brief,.metrics { margin-top:11px; display:grid; }
.brief > div,.metrics > div { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; padding:8px 0; border-bottom:1px solid var(--line); }
.brief > div:last-child,.metrics > div:last-child { border-bottom:0; }
.brief dt,.metrics dt { color:#4f5560; font-size:.9rem; }
.brief dd,.metrics dd { font-weight:780; font-variant-numeric:tabular-nums; }
.result-panel { scroll-margin-top:10px; }
.result-highlight { display:grid; gap:5px; margin-top:12px; padding:15px; border:1px solid #d8e8ff; border-radius:13px; background:var(--blue-soft); }
.result-highlight span { font-size:.9rem; color:#254568; font-weight:740; }
.result-highlight strong { color:#0053ac; font-size:clamp(1.58rem,3.4vw,2.5rem); font-weight:810; line-height:1.12; letter-spacing:-.045em; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.table-scroll { overflow-x:auto; max-width:100%; margin-top:11px; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.87rem; font-variant-numeric:tabular-nums; }
th,td { padding:7px 6px; border-bottom:1px solid var(--line); white-space:nowrap; }
thead { background:#f1f4f9; }
.period-group { min-width:0; padding:10px; margin:13px 0 0; border:1px solid var(--line); border-radius:10px; }
.period-group legend { padding:0 5px; }
.range-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.range-row + .range-row { border-top:1px solid var(--line); margin-top:8px; padding-top:9px; }
.link-button { color:#0055a8; text-decoration:underline; text-underline-offset:.17em; font-size:.88rem; border:0; background:transparent; padding:8px 0 0; font-weight:760; }
.range-remove { grid-column:1/-1; justify-self:end; }
.section-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:5px 15px; }
.section-head p { color:var(--muted); font-size:.88rem; }
.rules { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.rules > div { padding:12px; background:#f5f7fa; border:1px solid #e6eaf0; border-radius:12px; }
.rules p { margin-top:5px; color:#434752; font-size:.94rem; }
.panel details { border-bottom:1px solid var(--line); }
.panel details:last-child { border-bottom:0; }
.panel details summary { padding:10px 0; font-weight:720; }
.panel details p { color:var(--muted); padding-bottom:9px; }
.source-panel ul { margin-top:8px; padding-inline-start:18px; }
.source-panel li { margin-top:5px; font-size:.94rem; }
.more h2 { margin:0 0 9px 2px; }
.more-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.more-grid a { display:grid; gap:4px; padding:12px; background:#fff; border:1px solid var(--line); border-radius:13px; color:#004e9d; text-decoration:none; }
.more-grid a:hover { background:#f3f8ff; }
.more-grid span { color:#515158; font-size:.88rem; }
.footer { padding-block:12px 22px; border-top:1px solid var(--line); }
.footer > p { color:var(--muted); font-size:.88rem; }
@media(min-width:1240px) {
  .portfolio-layout > .main.wrap { width:100%; }
}
@media(max-width:930px) {
  .rules { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .workspace,.rules { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:540px) {
  .wrap { width:calc(100% - 26px); }
  .nav-row { min-height:0; padding-block:8px; gap:6px; }
  nav a { padding-inline:4px; font-size:.81rem; }
  .main { margin-top:13px; }
  .hero { grid-template-columns:minmax(0,1fr); border-radius:20px; }
  .hero h1 span { display:inline; }
  .hero-copy { padding:20px; }
  .hero p { margin-top:8px; }
  .hero .button { margin-top:11px; }
  .hero-photo { min-height:0; max-height:230px; object-position:74% 45%; }
  .field-grid,.more-grid { grid-template-columns:minmax(0,1fr); }
}
