:root {
  --ink: var(--ls-ink);
  --line: #ccd4dc;
  --night: var(--ls-void);
  --mist: #adc1da;
  --wide: 1180px;
  --gutter: clamp(20px, 5.5vw, 90px);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: #fbfcfd;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body, h1, h2, h3, figure, dl, dd { margin: 0; }
a { color: var(--ls-accent-on-light); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #579bff; outline-offset: 4px; }
[id] { scroll-margin-block-start: 22px; }
.skip-link { position: absolute; left: 12px; top: 10px; z-index: 1; background: white; padding: 10px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.masthead, .cover { color: var(--ls-on-dark); background: var(--night); }
.masthead { border-bottom: 1px solid #293344; }
.masthead-inner, .cover-inner, .reading-layout, .document-footer > div {
  width: min(calc(100% - 2 * var(--gutter)), var(--wide));
  margin-inline: auto;
}
.masthead-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { display: block; width: 136px; height: auto; }
.brand span { padding-left: 13px; border-left: 1px solid #48556a; color: #c2cddd; font-weight: 550; letter-spacing: .02em; }
.back-link, .example-link, .weight-link { color: #d7e5f6; text-decoration: none; }
.back-link, .example-link { display: inline-flex; align-items: center; gap: .65em; font-weight: 600; }
.back-link { font-size: .86rem; min-height: 44px; }
.document-languages { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 1rem; width: min(calc(100% - 2 * var(--gutter)), var(--wide)); margin: 0 auto; }
.document-languages a { display: inline-flex; align-items: center; min-height: 36px; font-size: .875rem; }
.document-languages a[aria-current] { font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.back-link:hover, .example-link:hover, .weight-link:hover { color: white; text-decoration: underline; }
.cover { background: radial-gradient(ellipse at 88% 82%, #132741 0, #0b1523 35%, var(--night) 76%); }
.cover-inner {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  align-items: center;
  gap: 0 clamp(44px, 7vw, 110px);
  padding-block: clamp(46px, 5vw, 80px) 0;
}
.cover h1 { font-size: clamp(3.1rem, 5.55vw, 5.15rem); font-weight: 750; line-height: 1.15; letter-spacing: -.05em; }
.title-product { display: block; margin-bottom: 14px; font: 600 clamp(.9rem, 1.3vw, 1.08rem)/1.4 var(--mono); letter-spacing: .035em; color: #9dbff3; }
.doc-lead { max-width: 40em; font-size: clamp(1rem, 1.24vw, 1.14rem); line-height: 1.92; color: var(--ls-on-dark-body); margin: 23px 0 15px; }
.example-link, .weight-link { font-size: .88rem; }
.example-link { min-height: 44px; }
.example-link span, .weight-link span { color: #93bbff; }
.byline {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .4em 1.45em;
  padding-block: 18px;
  margin: clamp(30px, 3.4vw, 54px) 0 0;
  border-top: 1px solid #314052;
  color: #b0c0d3;
  font-size: .8rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.weights { min-width: 0; width: 100%; }
.weights figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 1.2rem; font-weight: 700; }
.weights figcaption span { font-size: .78rem; color: var(--mist); font-weight: 500; }
.weight-chart {
  --unit: clamp(2.6px, .22vw, 3.7px);
  --label-space: 2.3rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 24px);
  padding-inline: 3%;
  padding-top: 8px;
  height: calc(40 * var(--unit) + var(--label-space) + 2.8rem);
  margin-block: 16px 8px;
}
.weight-chart::before {
  content: "";
  position: absolute;
  inset: auto 0 var(--label-space);
  height: calc(40 * var(--unit) + 1px);
  border-bottom: 1px solid #526278;
  background: repeating-linear-gradient(to top, transparent 0 calc(10 * var(--unit) - 1px), #29384b calc(10 * var(--unit)));
}
.weight-chart > div { position: relative; text-align: center; }
.weight-mention { --points: 35; --color: #84b5ff; }
.weight-citation { --points: 25; --color: #54d8c8; }
.weight-accuracy { --points: 20; --color: #f0ca78; }
.weight-action { --points: 20; --color: #ae9bf0; }
.weight-chart > div::before {
  content: "";
  position: absolute;
  inset: auto 7% var(--label-space);
  height: calc(var(--points) * var(--unit));
  border-top: 3px solid var(--color);
  background: var(--color);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--color) 65%, #172438), color-mix(in srgb, var(--color) 18%, #172438));
}
.weight-chart dt { position: absolute; inset: auto -.3em 0; height: var(--label-space); padding-top: 8px; color: #e0e9f5; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.weight-chart dd { position: absolute; inset: auto 0 calc(var(--label-space) + var(--points) * var(--unit) + 3px); font: 600 clamp(1.32rem, 2vw, 1.8rem)/1.3 var(--mono); color: var(--color); }
.weight-chart small { font: 500 .66rem/1 sans-serif; }
:lang(en) .weight-chart { --label-space: 3rem; }
:lang(en) .weight-chart dt { white-space: normal; line-height: 1.25; }
.weight-link { display: block; width: fit-content; padding-block: 8px; color: #b7cbed; }

.reading-layout { display: grid; grid-template-columns: minmax(165px, .68fr) minmax(0, 2.35fr); gap: clamp(50px, 7vw, 120px); align-items: start; padding-block: clamp(38px, 4.8vw, 75px) 86px; }
.contents { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.contents summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 14px; border-bottom: 1px solid #9aa8b8; color: var(--ink); cursor: pointer; font-weight: 700; font-size: .92rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
.contents summary::after { content: "+"; font: 1.1rem/1 var(--mono); color: #697a8e; }
.contents [open] > summary::after { content: "−"; }
.toc-nav { list-style: none; padding: 8px 0; margin: 0; }
.toc-nav a { display: block; padding: .5em 0 .5em .8em; border-left: 2px solid transparent; text-decoration: none; color: #526075; font-size: .89rem; line-height: 1.55; }
.toc-nav a:hover, .toc-nav a[aria-current] { color: var(--ls-accent-on-light); border-color: #527ec5; }
.document-body { width: 100%; max-width: 820px; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.95; overflow-wrap: anywhere; }
.document-body h2 { margin: clamp(42px, 5.6vw, 82px) 0 16px; padding-top: 25px; border-top: 1px solid var(--line); font-size: clamp(1.7rem, 2.75vw, 2.65rem); line-height: 1.35; letter-spacing: -.04em; text-wrap: pretty; }
.document-body h2:first-child { padding: 0; margin-top: 0; border: 0; }
.document-body h3 { margin: 38px 0 12px; font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.5; letter-spacing: -.03em; }
.document-body p { margin: 0 0 1em; }
.document-body strong { font-weight: 700; }
code { font: .85em/1.5 var(--mono); color: #264264; overflow-wrap: anywhere; }
.sharp-table { width: 100%; border-collapse: collapse; margin: 25px 0; font-size: .92em; line-height: 1.73; }
.sharp-table th, .sharp-table td { text-align: left; vertical-align: top; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.sharp-table th { font-size: .92em; color: #344b68; background: #eaf0f6; border-top: 2px solid #324969; }
.sharp-table td:first-child { min-width: 7em; }
#score-example + p + .sharp-table td:last-child strong { color: var(--ls-accent-on-light); }
.method-detail { border-block: 1px solid #b9c7d8; padding: 0 16px; margin-block: 22px; background: #f1f5f9; }
.method-detail summary { font-weight: 650; font-size: .93em; color: #214b84; padding: 13px 0; cursor: pointer; }
.method-detail[open] summary { margin-bottom: 8px; }
.document-footer { background: var(--night); }
.document-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 24px; }
.document-footer a { text-decoration: none; color: #c3d0e0; font-size: .88rem; padding: 6px 0; }
.document-footer a:hover { text-decoration: underline; }

@media (max-width: 899px) {
  .reading-layout { display: block; padding-top: 25px; }
  .contents { position: static; max-height: none; margin-bottom: 30px; overflow: visible; }
  .contents summary { min-height: 44px; }
  .cover-inner { gap: 0 25px; grid-template-columns: 1.2fr 1fr; }
}
@media (max-width: 700px) {
  .masthead-inner { min-height: 58px; }
  .brand { gap: 9px; }
  .brand img { width: clamp(91px, 26vw, 122px); }
  .brand span { padding-left: 9px; font-size: .88rem; }
  .cover-inner { display: block; padding-block-start: 36px; }
  .title-product { margin-bottom: 8px; }
  .doc-lead { margin: 16px 0 6px; line-height: 1.78; }
  .weights { margin-top: 23px; }
  .weight-chart { --unit: 2px; --label-space: 1.9rem; height: calc(40 * var(--unit) + var(--label-space) + 2rem); margin-block: 8px 0; }
  .weights figcaption { font-size: 1rem; }
  .weight-chart dt { font-size: .76rem; }
  .byline { margin-top: 16px; padding-block: 12px; gap: .25em 1em; font-size: .75rem; }
}
@media screen and (max-width: 600px) {
  .sharp-table, .sharp-table tbody, .sharp-table tr { display: block; }
  .sharp-table { border-top: 2px solid #324969; }
  .sharp-table thead { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; }
  .sharp-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .sharp-table td { display: block; padding: 0; border: 0; }
  .sharp-table td + td { padding-top: .45em; }
  .sharp-table td[data-label]::before { content: attr(data-label) "　"; font-size: .86em; font-weight: 700; color: #425e80; }
}
@media print {
  :root { background: white; color: black; }
  .masthead, .contents, .document-footer, .document-languages, .example-link, .weight-link, .skip-link { display: none; }
  .cover { background: white; color: black; border-bottom: 1pt solid #888; }
  .cover-inner, .reading-layout { width: 100%; display: block; padding: 0; }
  .cover h1 { font-size: 32pt; }
  .title-product, .doc-lead, .byline { color: #26384c; }
  .weights { width: 70%; margin-block: 12pt; color: black; break-inside: avoid; }
  .weights figcaption span, .weight-chart dt, .weight-chart dd { color: #26384c; }
  .weight-chart { --unit: 1.6px; height: calc(40 * var(--unit) + var(--label-space) + 2rem); }
  .weight-chart > div::before { print-color-adjust: exact; }
  .byline { margin: 12pt 0; padding: 6pt 0; }
  .document-body { max-width: none; font-size: 10.5pt; line-height: 1.55; }
  .document-body h2 { margin-top: 18pt; padding-top: 9pt; font-size: 17pt; }
  .document-body h2:first-child { margin-top: 15pt; }
  .document-body h3 { margin-top: 14pt; font-size: 14pt; }
  h1, h2, h3, summary { break-after: avoid; }
  tr, figure { break-inside: avoid; }
  .sharp-table { margin: 12pt 0; }
  .sharp-table th, .sharp-table td { padding: 6pt; }
}
