:root {
  color-scheme: light;
  --paper: #edf2ec;
  --surface: #fbfdf9;
  --ink: #1d2923;
  --muted: #526158;
  --line: #cdcfc1;
  --rule: #a9b1a0;
  --forest: #173a2d;
  --forest-dark: #102d23;
  --forest-text: #f8f5e8;
  --forest-muted: #c4d1c0;
  --forest-rule: #577264;
  --accent: #a84228;
  --amber: #f5bd64;
  --amber-bright: #ffd89a;
  --wash: #e2ebe1;
  --input-line: #778978;
  --radius: 5px;
  --content-width: 1160px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1.6; }
body, input, select { scrollbar-color: var(--rule) var(--surface); }
::selection { background: var(--amber); color: var(--forest-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.24; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--forest); text-underline-offset: .24em; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
button, input, select, a, summary { -webkit-tap-highlight-color: #a8422824; }
input { caret-color: var(--accent); }
input::placeholder { color: var(--muted); opacity: 1; }
.frame { width: min(var(--content-width), calc(100% - 72px)); margin-inline: auto; }
.main { min-height: 64vh; padding-block: clamp(32px, 5.2vw, 72px) 58px; }
.main:focus { outline: none; }

.skip-link { position: absolute; inset: 8px auto auto 12px; z-index: 5; padding: 9px 14px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(12px, 3vw, 40px); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; justify-self: start; min-height: 44px; font-size: 1.12rem; font-weight: 800; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand-icon { position: relative; display: inline-block; flex: none; width: 27px; height: 27px; border-radius: 4px; background: var(--forest); }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; left: 6px; height: 3px; background: var(--amber); }
.brand-icon::before { top: 8px; width: 15px; }
.brand-icon::after { top: 15px; width: 10px; }
.main-nav { display: flex; gap: clamp(16px, 2.9vw, 33px); }
.main-nav a { display: flex; align-items: center; justify-content: center; min-height: 68px; border-bottom: 2px solid transparent; padding-top: 2px; color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 650; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current] { color: var(--forest); border-color: var(--accent); font-weight: 800; }
.search-button { display: inline-flex; align-items: center; justify-self: end; gap: 8px; min-height: 44px; padding: 0 10px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); white-space: nowrap; }
.search-button:hover { background: var(--wash); }
.search-button kbd { padding-inline: 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font: 500 .72rem system-ui, sans-serif; line-height: 1.6; }
.search-icon { position: relative; display: inline-block; width: 14px; height: 14px; flex: none; margin-right: 3px; border: 1.6px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.6px; background: currentColor; left: calc(100% - 1px); top: calc(100% - 1px); transform: rotate(45deg); transform-origin: left; }

.home-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: "heading boss" "guides boss" "guides record"; align-items: start; gap: 27px clamp(30px, 6vw, 83px); }
.home-heading { grid-area: heading; }
.home-heading h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 850; line-height: 1.08; color: var(--forest-dark); }
.home-heading .text-link { margin-top: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.section-heading h2, .home-record h2 { font-size: clamp(1.22rem, 2.25vw, 1.57rem); font-weight: 800; }
.section-heading p { font-size: .86rem; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 9px; font-size: .92rem; font-weight: 730; text-decoration-thickness: 1px; }
.text-link::after, .directory a::after, .home-record a::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex: none;
}
.home-guides { grid-area: guides; }
.directory { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--forest); }
.directory li { border-bottom: 1px solid var(--line); }
.directory a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 14px; position: relative; padding: 11px 23px 11px 0; min-height: 60px; text-decoration: none; }
.directory a::after { position: absolute; right: 5px; top: calc(50% - 4px); }
.directory a:hover strong { text-decoration: underline; text-underline-offset: .22em; }
.directory strong { display: block; font-size: 1rem; font-weight: 800; word-break: keep-all; }
.directory span, .directory p, .directory time { color: var(--muted); font-size: .89rem; }
.home-guides .directory span { grid-row: 2; grid-column: 1 / -1; }
.home-boss { grid-area: boss; align-self: start; background: var(--forest); color: var(--forest-text); border-radius: 14px; padding: clamp(20px, 3vw, 32px); }
.home-boss .section-heading { margin-bottom: 16px; }
.home-boss .section-heading h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.home-boss .section-heading p { color: var(--forest-muted); }
.home-boss-form { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 12px; }
.home-boss-form label:first-child, .home-boss-form .primary-button { grid-column: 1 / -1; }
.home-boss-form select { background-color: var(--surface); color: var(--ink); border-color: transparent; }
.home-boss .primary-button { background: var(--amber); color: var(--forest-dark); border-color: var(--amber); }
.home-boss .primary-button:hover { background: var(--amber-bright); border-color: var(--amber-bright); color: var(--forest-dark); }
.home-boss :focus-visible { outline-color: var(--amber); }
.home-boss .home-boss-status { min-height: 113px; color: var(--forest-muted); }
.home-boss .home-boss-status button { color: var(--forest-text); }
.home-boss a { color: var(--forest-text); }
.quick-links { display: flex; flex-wrap: wrap; gap: 0 15px; margin-top: 12px; border-top: 1px solid var(--forest-rule); }
.quick-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .88rem; }
.quick-links a:hover { color: var(--amber-bright); }
.home-record { grid-area: record; }
.home-record h2 { font-size: 1.06rem; margin-bottom: 8px; }
.home-record a { display: grid; position: relative; gap: 2px; padding: 10px 23px 10px 0; border-top: 1px solid var(--rule); text-decoration: none; font-variant-numeric: tabular-nums; }
.home-record a:hover strong { text-decoration: underline; }
.home-record a::after { position: absolute; right: 5px; top: calc(50% - 4px); }
.home-record span { font-size: .94rem; }
.home-record small { color: var(--muted); font-size: .82rem; }

.primary-button, .quiet-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; min-height: 44px; border: 1px solid var(--forest); border-radius: var(--radius); font-weight: 750; line-height: 1.3; text-decoration: none; text-align: center; }
.primary-button { background: var(--forest); color: var(--forest-text); }
.primary-button:hover { background: var(--forest-dark); color: var(--forest-text); }
.quiet-button { background: transparent; color: var(--forest); border-color: var(--rule); }
.quiet-button:hover { background: var(--wash); color: var(--forest); }
select, input[type="search"] { min-height: 44px; min-width: 0; width: 100%; border: 1px solid var(--input-line); border-radius: var(--radius); padding: 7px 10px; background: var(--surface); }
select { padding-right: 24px; }
.boss-filter label, .home-boss-form label { display: grid; align-content: start; gap: 4px; min-width: 0; font-size: .89rem; font-weight: 750; }
.boss-filter select, .home-boss-form select { font-size: 1rem; font-weight: 550; }

.page-header { display: flex; align-items: end; justify-content: space-between; gap: 12px 20px; padding-bottom: 16px; border-bottom: 2px solid var(--forest); margin-bottom: 16px; }
.page-header h1 { font-size: clamp(2rem, 4.8vw, 3.5rem); color: var(--forest-dark); font-weight: 850; }
.page-header p { color: var(--muted); margin-top: 7px; word-break: keep-all; max-width: 60ch; }
.page-header .quiet-button { flex: none; }
.boss-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .64fr); gap: 10px 14px; }
.result-area { margin-top: 37px; }
.result-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 13px; margin-bottom: 9px; }
.result-title h2 { font-size: clamp(1.26rem, 3.2vw, 2.05rem); }
.result-title span, .cut-caption { color: var(--muted); font-size: .875rem; }
.cut-sheet { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.cut-caption { border-bottom: 1px solid var(--line); padding: 7px clamp(11px, 2.4vw, 22px); font-weight: 650; }
.cut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cut-column { min-width: 0; padding: clamp(11px, 2.4vw, 22px); }
.cut-column + .cut-column { border-left: 1px solid var(--line); }
.cut-column h3, .info-grid h3 { font-size: 1.13rem; }
.cut-goal { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.cut-value { display: block; margin-top: 7px; color: var(--forest-dark); font-size: clamp(1.28rem, 3vw, 2.1rem); font-weight: 850; line-height: 1.3; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: -.038em; }
.cut-column + .cut-column .cut-value { color: var(--accent); }
.observation { margin-top: 11px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.observation strong { color: var(--forest); }
.observation span { display: block; }
.projection { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--wash); }
.projection p { color: var(--muted); font-size: .9rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 34px; margin-block: 22px; }
.info-grid ul { margin: 8px 0 0; padding-left: 1.3em; }
.info-grid li + li { margin-top: 4px; }
.disclosure { border-bottom: 1px solid var(--line); }
.disclosure summary, .guide-contents summary { cursor: pointer; padding-block: 11px; min-height: 44px; font-weight: 750; }
.disclosure summary::marker, .guide-contents summary::marker { color: var(--accent); }
.disclosure > p { color: var(--muted); margin-bottom: 11px; }
.run { border-top: 1px solid var(--line); padding-block: 11px; }
.run h4 { font-size: 1.02rem; }
.run p { margin: 4px 0; }
.run a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 12px; }
.run dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 14px; margin: 8px 0; font-size: .93rem; }
.run dt { color: var(--muted); }
.run dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.category-tabs { display: flex; flex-wrap: wrap; gap: 1px 12px; margin-bottom: 16px; }
.category-tabs a { display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; padding: 4px 7px; min-height: 44px; font-size: .91rem; border-bottom: 2px solid transparent; }
.category-tabs a:hover { color: var(--accent); }
.category-tabs a[aria-current] { color: var(--forest); border-color: var(--accent); font-weight: 780; }
.guide-list a { min-height: 71px; }
.guide-list time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.crumb { display: inline-flex; align-items: center; min-height: 44px; font-weight: 720; }
.guide-layout { display: grid; grid-template-columns: minmax(162px, 205px) minmax(0, 1fr); align-items: start; gap: clamp(17px, 3vw, 38px); }
.guide-contents { border-bottom: 1px solid var(--line); position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.guide-contents nav { padding-bottom: 8px; }
.guide-contents a { display: flex; align-items: center; min-height: 36px; padding: 5px; text-decoration: none; font-size: .86rem; word-break: keep-all; }
.guide-contents a.minor { padding-left: 15px; }
.guide-contents a:hover { background: var(--wash); }
.guide-doc { min-width: 0; }
.guide-find { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-find input { flex: 1 1 180px; width: auto; }
.guide-find-results { color: var(--muted); font-size: .87rem; }
.guide-find-results:not(:empty) { margin-block: 8px; }
.guide-find-results a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 11px; }
.article { overflow-wrap: anywhere; }
.article p { margin: .8rem 0; max-width: 74ch; }
.article li { max-width: 74ch; }
.article h2 { margin-top: 1.8rem; padding-top: .65rem; border-top: 1px solid var(--rule); font-size: 1.5rem; }
.article h3 { margin-top: 1.25rem; font-size: 1.18rem; }
.article h2, .article h3, .article h4 { scroll-margin-top: 13px; }
.article ul, .article ol { padding-left: 1.4rem; }
.article blockquote { margin-inline: 0; padding-inline: 14px; border-inline-start: 1px solid var(--rule); }
.table-scroll { max-width: 100%; overflow-x: auto; border-block: 1px solid var(--rule); margin: .8rem 0 1.05rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--surface); font-variant-numeric: tabular-nums; }
thead { background: var(--wash); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 82px; }
th { color: var(--forest-dark); font-weight: 780; }
tbody tr:last-child td { border-bottom: 0; }
.article table:has(th:nth-child(5)), .wide-table { min-width: 730px; }
.sources-sheet { margin-bottom: 19px; }
.sources-sheet h2 { font-size: 1.36rem; }
.source-filter { display: flex; align-items: center; gap: 10px; max-width: 420px; margin-block: 10px; }
.source-filter input { flex: 1; }
.download-list, .source-list { margin-block: 7px 10px; padding: 0; list-style: none; }
.download-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 7px; border-bottom: 1px solid var(--line); }
.download-row p { color: var(--muted); font-size: .88rem; }
.download-row a { flex: none; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.source-list li { border-top: 1px solid var(--line); padding-block: 7px; font-size: .92rem; }
.empty { padding: 11px 0; color: var(--muted); }
.empty button { margin-left: 6px; }

.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding-block: 17px 21px; }
.footer-inner p { font-size: .81rem; color: var(--muted); }
.footer-brand { color: var(--forest); font-weight: 800; text-decoration: none; }
.footer-inner > div:last-child { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .88rem; }
.footer-inner > div:last-child a { display: inline-flex; align-items: center; min-height: 44px; }

.search-dialog { width: min(610px, calc(100% - 24px)); max-height: 82dvh; overflow: auto; margin: min(11vh, 96px) auto auto; padding: clamp(12px, 3vw, 24px); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.search-dialog::backdrop { background: #10251cb8; }
.dialog-header, .dialog-form { display: flex; gap: 9px; align-items: center; }
.dialog-header { justify-content: space-between; margin-bottom: 11px; }
.dialog-header h2 { font-size: 1.38rem; }
.dialog-form { border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.dialog-form input { flex: 1 1 0; width: auto; }
.search-results { margin-top: 6px; }
.search-result { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 10px 5px; min-height: 44px; text-decoration: none; border-bottom: 1px solid var(--line); }
.search-result:hover, .search-result:focus-visible { background: var(--wash); }
.search-result small, .result-empty { color: var(--muted); font-size: .85rem; }
.result-empty { padding: 9px 1px; }

@media (max-width: 760px) {
  .frame { width: calc(100% - 32px); }
  .topbar-inner { grid-template-columns: 1fr auto; gap: 0; padding-top: 5px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; gap: 9px; justify-content: space-between; }
  .main-nav a { min-height: 44px; padding-inline: 6px; font-size: .88rem; }
  .search-button kbd { display: none; }
  .home-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "heading" "boss" "guides" "record"; gap: 22px; }
  .home-heading .text-link { margin-top: 7px; }
  .home-boss .section-heading { margin-bottom: 10px; }
  .quick-links { margin-top: 9px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .guide-contents { position: static; max-height: 270px; }
  .guide-contents a { min-height: 44px; }
}
@media (max-width: 460px) {
  .main { padding-block: 23px 37px; }
  .home-heading h1 { font-size: clamp(2.13rem, 9vw, 2.6rem); }
  .home-boss { padding: 16px; }
  .page-header { flex-wrap: wrap; align-items: start; }
  .boss-filter { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .boss-filter label:first-child { grid-column: 1 / -1; }
  .result-area { margin-top: 25px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-list a { grid-template-columns: minmax(0, 1fr); }
  .dialog-form > .search-icon { display: none; }
}
@media (max-width: 345px) {
  .frame { width: calc(100% - 24px); }
  .main-nav { gap: 3px; }
  .main-nav a { padding-inline: 4px; }
  .cut-grid { grid-template-columns: minmax(0, 1fr); }
  .cut-column + .cut-column { border-left: 0; border-top: 1px solid var(--line); }
}
