:root {
  --stone: #ECE7E0; --linen: #F8F4EF; --paper: #FBF8F3; --ink: #2A2420; --ink-2: #5E554D; --muted: #8A7A63;
  --gold: #C9A267; --gold-d: #A47F4C; --line: rgba(164,127,76,0.22);
  --f-display: 'Cormorant Garamond', Georgia, serif; --f-ui: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { margin: 0; background: var(--linen); color: var(--ink); font: 400 16px/1.7 var(--f-ui); }
a { color: var(--gold-d); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.lg-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(20px, calc((100vw - 1120px) / 2)); background: rgba(248,244,239,0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.lg-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.lg-brand img { height: 34px; width: auto; }
.lg-brand span { font: 500 19px var(--f-display); letter-spacing: 0.22em; }
.lg-back { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; transition: background 0.3s, color 0.3s; }
.lg-back:hover { background: var(--ink); color: var(--linen); }

.lg-hero { padding: clamp(56px, 8vw, 104px) max(20px, calc((100vw - 1120px) / 2)) clamp(32px, 4vw, 48px); background: radial-gradient(60% 90% at 20% 0%, #FBF7F1 0%, var(--linen) 60%); }
.lg-kicker { margin: 0 0 14px; color: var(--gold-d); font-size: 14px; font-weight: 500; }
.lg-hero h1 { margin: 0; font: 500 clamp(44px, 6vw, 76px)/1.02 var(--f-display); letter-spacing: -0.015em; }
.lg-meta { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

.lg-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: 0 max(20px, calc((100vw - 1120px) / 2)) 96px; }
.lg-toc { position: sticky; top: 92px; align-self: start; padding: 22px 0; border-top: 1px solid var(--line); }
.lg-toc p { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lg-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.lg-toc li { counter-increment: t; }
.lg-toc a { display: flex; gap: 10px; padding: 6px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.4; }
.lg-toc a::before { content: counter(t); min-width: 18px; color: var(--gold-d); font-family: var(--f-display); font-size: 16px; }
.lg-toc a:hover { color: var(--ink); }

.lg-doc { max-width: 760px; }
.lg-doc section { padding: 34px 0 10px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.lg-doc h2 { margin: 0 0 16px; font: 500 clamp(28px, 3vw, 36px)/1.15 var(--f-display); }
.lg-doc h2 small { display: block; margin-bottom: 6px; font: 500 14px var(--f-ui); color: var(--gold-d); }
.lg-doc h3 { margin: 24px 0 8px; font: 600 16px var(--f-ui); }
.lg-doc p, .lg-doc li { color: var(--ink-2); }
.lg-doc ol, .lg-doc ul { padding-left: 22px; }
.lg-doc li { margin: 6px 0; }
.lg-doc li::marker { color: var(--gold-d); }
.lg-doc strong { color: var(--ink); font-weight: 600; }
.lg-card { margin: 18px 0; padding: 22px 24px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.lg-card p { margin: 4px 0; }
.lg-table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 14.5px; }
.lg-table th, .lg-table td { padding: 12px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.lg-table th { color: var(--ink); font-weight: 600; font-size: 13px; }
.lg-table code { font-size: 13px; color: var(--ink); background: #F1EADF; padding: 2px 6px; border-radius: 6px; }
.fill { background: #F6E7C8; color: var(--ink); padding: 1px 6px; border-radius: 6px; font-weight: 500; }
.lg-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 24px; border-radius: 999px; border: none; background: var(--ink); color: var(--linen); font: 500 14.5px var(--f-ui); cursor: pointer; }
.lg-btn:hover { background: #4A3D33; }
.lg-form { white-space: pre-line; font-size: 14.5px; }

.lg-foot { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; padding: 32px max(20px, calc((100vw - 1120px) / 2)); background: #2A2420; color: #CFC4B6; font-size: 14px; }
.lg-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.lg-foot a, .lg-foot button { color: #EFE6DA; text-decoration: none; background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.lg-foot a:hover, .lg-foot button:hover { color: #E4C894; }

@media (max-width: 860px) {
  .lg-wrap { grid-template-columns: 1fr; }
  .lg-toc { position: static; }
  .lg-brand span { display: none; }
  .lg-table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; width: 100%; }
  .lg-table thead { display: none; }
  .lg-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .lg-table td { border: none; padding: 3px 0; }
  .lg-table td[data-l]::before { content: attr(data-l) ': '; font-weight: 600; color: var(--ink); }
}
@media print { .lg-top, .lg-toc, .lg-foot, .hb-ck { display: none !important; } .lg-wrap { display: block; } }
