:root {
  --bg: #fff;
  --surface: #f7f7f6;
  --warm: #f2f2f0;
  --text: #111;
  --secondary: #333;
  --muted: #6b6b67;
  --border: #d2d2ce;
  --border-soft: #e4e4e1;
  --accent: #ff3d00;
  --accent-text: #d93500;
  --accent-deep: #b82d00;
  --accent-tint: #ffede6;
  font-family: Inter, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  scrollbar-color: var(--border) var(--surface);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-tint); color: var(--text); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 5px; }
h2:focus, article:focus { outline: none; }
.container { width: min(100%, 1240px); padding-inline: 32px; margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 24px; z-index: 120; padding: 12px 20px; background: var(--text); color: white; border-radius: 10px; }
.skip-link:focus { top: 8px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-inner { height: 64px; display: flex; align-items: center; position: relative; gap: 24px; }
.brand { font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.brand span { color: var(--accent-text); }
.site-nav { display: flex; align-items: center; gap: 8px; margin-inline: auto; }
.site-nav a { min-height: 44px; display: flex; align-items: center; padding-inline: 10px; font-size: 14px; color: var(--secondary); text-decoration: none; }
.site-nav a:hover { color: var(--accent-text); }
.cabinet-link { display: flex; align-items: center; min-height: 36px; border: 1px solid var(--text); border-radius: 16px; font-size: 14px; font-weight: 600; padding: 0 14px; text-decoration: none; }
.cabinet-link:hover { background: var(--warm); }
.mobile-menu { display: none; }
.preview-status { background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.preview-status .container { min-height: 34px; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.preview-status span { padding-left: 12px; border-left: 1px solid var(--border); color: var(--accent-deep); }
.breadcrumb { display: flex; align-items: center; gap: 8px; padding-top: 40px; margin-bottom: 28px; color: var(--muted); font-size: 14px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); }
.breadcrumb svg { width: 14px; height: 14px; }
.article-intro { max-width: 840px; padding-bottom: 44px; }
h1 { margin: 0; font-size: clamp(38px, 3.6vw, 52px); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-block: 26px 30px; font-size: 14px; color: var(--muted); }
.article-meta span:first-child { color: var(--text); font-weight: 500; }
.intro-copy { max-width: 720px; font-size: 20px; line-height: 1.6; }
.intro-copy p { margin: 0 0 20px; }
.intro-copy p:first-child { font-size: 22px; line-height: 1.5; }
.intro-copy p:last-child { font-size: 17px; line-height: 1.55; color: var(--muted); margin-bottom: 0; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 848px) minmax(190px, 240px); gap: 64px; align-items: start; padding-bottom: 88px; }
.contents { grid-column: 2; grid-row: 1; position: sticky; top: 104px; padding-left: 20px; border-left: 1px solid var(--border-soft); }
.contents-title { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.contents ol, .mobile-contents ol { list-style: none; margin: 0; padding: 0; }
.contents li + li { margin-top: 14px; }
.contents a { display: block; font-size: 14px; line-height: 1.5; text-decoration: none; color: var(--muted); }
.contents a:hover, .contents a[aria-current='true'] { color: var(--accent-text); }
.article-body { grid-column: 1; grid-row: 1; min-width: 0; font-size: 20px; line-height: 1.65; }
.article-body > p, .article-body > h2, .article-body > h3, .article-body > ol { max-width: 720px; }
.article-body > p { margin: 0 0 22px; }
.article-body > p strong { font-weight: 600; }
.article-body a:not(.course-link) { color: var(--accent-text); text-decoration-color: var(--border); }
.article-body a:not(.course-link):hover { color: var(--accent-deep); text-decoration-color: currentColor; }
h2 { margin: 64px 0 24px; font-size: 34px; font-weight: 600; line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; scroll-margin-top: 98px; }
.article-body > h2:first-of-type { margin-top: 0; }
h3 { margin: 42px 0 18px; font-size: 26px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.article-body > ol { padding-left: 26px; margin: 24px 0; }
.article-body > ol li { padding-left: 6px; margin-block: 12px; }
.article-body > ol li::marker { color: var(--accent-text); font-weight: 600; }
.comparison-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 12px; margin: 32px 0; scrollbar-width: thin; scrollbar-color: var(--muted) var(--surface); }
table { width: 100%; min-width: 790px; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; background: var(--warm); }
th, td { padding: 16px 14px; vertical-align: top; border-bottom: 1px solid var(--border-soft); }
th:first-child, td:first-child { width: 145px; position: sticky; left: 0; background: var(--bg); border-right: 1px solid var(--border-soft); font-weight: 600; }
th:first-child { background: var(--warm); }
tr:last-child td { border-bottom: 0; }
.article-body > .table-hint { display: none; font-size: 13px; color: var(--muted); margin-top: -18px; }
figure { margin: 30px 0 38px; }
.sheet-button { position: relative; display: block; border: 1px solid var(--border-soft); padding: 0; width: 100%; background: var(--bg); overflow: hidden; border-radius: 12px; }
.sheet-button img { display: block; width: 100%; height: auto; }
.sheet-action { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border-top: 1px solid var(--border-soft); color: var(--secondary); font-size: 14px; font-weight: 500; }
.sheet-button:hover .sheet-action { color: var(--accent-deep); background: var(--accent-tint); }
figcaption { margin-top: 12px; max-width: 720px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.course-ending { background: var(--warm); padding: 32px; margin-top: 40px; border-radius: 16px; }
.course-ending p { margin: 0 0 24px; max-width: 700px; font-size: 20px; line-height: 1.55; }
.course-link { width: fit-content; display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 52px; padding: 12px 20px; border-radius: 16px; background: var(--accent-text); color: white; font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.course-link:hover { background: var(--accent-deep); }
.mobile-contents { display: none; }
.site-footer { background: var(--text); color: var(--bg); padding-block: 42px; }
.footer-inner { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.footer-inner p { margin: 0 auto 0 0; max-width: 380px; font-size: 13px; line-height: 1.5; color: #b0b0ab; }
.footer-inner > a:not(.brand) { font-size: 14px; text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }
.sheet-viewer { width: min(1280px, calc(100% - 40px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 0; border-radius: 16px; color: var(--text); background: var(--bg); }
.sheet-viewer::backdrop { background: rgb(17 17 17 / 80%); }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; height: 58px; padding: 8px 16px; border-bottom: 1px solid var(--border-soft); }
.viewer-toolbar button { border: 0; background: var(--surface); border-radius: 10px; min-height: 42px; padding: 8px 14px; font-size: 14px; }
.viewer-toolbar button:hover { background: var(--warm); }
.viewer-close { display: flex; align-items: center; justify-content: center; width: 42px; }
.viewer-canvas { max-height: calc(100dvh - 180px); overflow: auto; scrollbar-color: var(--muted) var(--surface); }
.viewer-canvas img { display: block; width: 100%; height: auto; }
.viewer-canvas.is-zoomed img { width: max(100%, 1800px); max-width: none; }
#viewer-caption { margin: 0; padding: 14px 20px; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 1000px) {
  .reading-layout { display: block; }
  .contents { display: none; }
  .article-intro, .article-body { max-width: 800px; }
  .mobile-contents { display: block; border-block: 1px solid var(--border-soft); margin-bottom: 40px; }
  .mobile-contents summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; }
  .mobile-contents summary::-webkit-details-marker { display: none; }
  .mobile-contents[open] summary svg { rotate: 180deg; }
  .mobile-contents li { border-top: 1px solid var(--border-soft); }
  .mobile-contents a { display: block; padding-block: 13px; font-size: 15px; line-height: 1.5; text-decoration: none; }
  .article-body > .table-hint { display: block; }
}
@media (max-width: 720px) {
  .container { padding-inline: 20px; }
  .header-inner { height: 60px; gap: 12px; }
  .brand { font-size: 18px; }
  .site-nav { display: none; }
  .cabinet-link { margin-left: auto; font-size: 13px; min-height: 34px; padding-inline: 12px; }
  .mobile-menu { display: block; }
  .mobile-menu summary { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; list-style: none; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu nav { position: absolute; inset: 60px 0 auto; padding: 14px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .mobile-menu nav a { display: block; padding-block: 14px; font-size: 18px; text-decoration: none; }
  .breadcrumb { padding-top: 26px; margin-bottom: 22px; font-size: 13px; }
  h1 { font-size: 34px; line-height: 1.13; letter-spacing: -.03em; text-wrap: pretty; }
  .article-meta { gap: 16px; margin-block: 24px; font-size: 13px; }
  .intro-copy { font-size: 18px; line-height: 1.6; }
  .intro-copy p:first-child { font-size: 20px; line-height: 1.5; }
  .intro-copy p:last-child { font-size: 16px; }
  .article-intro { padding-bottom: 32px; }
  .article-body { font-size: 18px; line-height: 1.65; }
  h2 { margin-top: 50px; margin-bottom: 20px; font-size: 28px; line-height: 1.2; }
  h3 { margin-top: 34px; margin-bottom: 16px; font-size: 23px; }
  .comparison-wrap { margin-block: 26px; }
  figure { margin-block: 26px; }
  figcaption { font-size: 13px; }
  .course-ending { padding: 24px 20px; margin-top: 32px; }
  .course-ending p { font-size: 18px; }
  .course-link { width: 100%; font-size: 15px; gap: 12px; }
  .reading-layout { padding-bottom: 56px; }
  .footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .footer-inner .brand, .footer-inner p { grid-column: 1 / -1; }
  .sheet-viewer { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .viewer-canvas { max-height: calc(100dvh - 170px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
