/* Stone & Gravel Calculators – "limestone & terracotta" design system (light, white page).
   Layout: full-width limestone hero (title left, weigh-ticket result right), then a sticky "on this page" rail beside the article. */
:root {
	--sgc-bg: #ffffff;         /* page */
	--sgc-bg2: #f6f4ee;        /* limestone tint: hero band, cards */
	--sgc-bg3: #ede9df;        /* deeper tint: chips, table heads */
	--sgc-line: #e4dfd3;
	--sgc-line2: #cfc8b8;
	--sgc-fg: #1f2a37;         /* slate */
	--sgc-fg2: #566070;
	--sgc-fg3: #8a8f99;
	--sgc-accent: #c2410c;     /* terracotta */
	--sgc-accent2: #9a3412;
	--sgc-accent-soft: #fbe9df;
	--sgc-slate: #1f2a37;
	--sgc-paper: #fffdf7;      /* weigh ticket */
	--sgc-ink: #1f2a37;
	--sgc-ink2: #6b6a62;
	--sgc-green: #2f7a4f;
	--sgc-display: "Zilla Slab", Georgia, "Times New Roman", serif;
	--sgc-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sgc-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--sgc-radius: 14px;
	--sgc-max: 1200px;
	--sgc-shadow: 0 1px 2px rgba(31,42,55,.06), 0 12px 32px -16px rgba(31,42,55,.25);
}

/* ---------- light GeneratePress tuning (background stays white) ---------- */
html { overflow-x: hidden; } /* full-bleed hero/band are 100vw wide (incl. the scrollbar) */
body.sgc-site { background: var(--sgc-bg); color: var(--sgc-fg); font-family: var(--sgc-body); }
body.sgc-site .site-header { border-bottom: 1px solid var(--sgc-line); }
body.sgc-site .main-title a { font-family: var(--sgc-display); font-weight: 700; font-size: 1.5rem; color: var(--sgc-fg); }
body.sgc-site .main-navigation a { font-weight: 600; }
body.sgc-site .main-navigation a:hover, body.sgc-site .main-navigation .current-menu-item > a { color: var(--sgc-accent); }
body.sgc-site .entry-title, body.sgc-site .page-header h1, body.sgc-site h1, body.sgc-site h2, body.sgc-site h3 { font-family: var(--sgc-display); color: var(--sgc-fg); }
body.sgc-site .entry-title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; line-height: 1.08; }
body.sgc-site .entry-meta, body.sgc-site .posted-on, body.sgc-site .byline, body.sgc-site .cat-links a { color: var(--sgc-fg3); }
body.sgc-site a { color: var(--sgc-accent); }
body.sgc-site a:hover { color: var(--sgc-accent2); }
/* ---------- footer: slate, four columns, then the legal bar ---------- */
.sgc-footer { background: var(--sgc-slate); color: #c9d0da; font-family: var(--sgc-body); margin-top: 3rem; border-top: 4px solid var(--sgc-accent); }
.sgc-footer * { box-sizing: border-box; }
.sgc-footer-in { max-width: var(--sgc-max); margin: 0 auto; padding: 3rem 20px 2.5rem; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.sgc-footer-brand p { margin: 1.1rem 0 0; font-size: .95rem; line-height: 1.6; color: #b4bdc9; max-width: 42ch; }
.sgc-footer-logo { display: inline-block; }
.sgc-footer-logo img { display: block; height: 40px; width: auto; }
.sgc-footer-ticks { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; font-weight: 600; color: #e9e4d8; }
.sgc-footer-ticks li::before { content: '✓'; color: #f6b48a; margin-right: .4rem; font-weight: 800; }
body.sgc-site .sgc-footer-mail a { color: #f6b48a; text-decoration: none; font-weight: 600; }
body.sgc-site .sgc-footer-mail a:hover { color: #fff; text-decoration: underline; }
body.sgc-site .sgc-footer-col h3 { font-family: var(--sgc-display); font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 .85rem; letter-spacing: .01em; }
body.sgc-site .sgc-footer-col h3 a { color: #fff; text-decoration: none; }
body.sgc-site .sgc-footer-col h3 a:hover { color: #f6b48a; }
.sgc-footer-h-gap { margin-top: 1.6rem !important; }
.sgc-footer-links { list-style: none; margin: 0; padding: 0; }
.sgc-footer-links li { margin: 0 0 .5rem; font-size: .93rem; line-height: 1.4; }
body.sgc-site .sgc-footer-links a { color: #c9d0da; text-decoration: none; }
body.sgc-site .sgc-footer-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--sgc-accent); text-underline-offset: 3px; }
@media (max-width: 960px) { .sgc-footer-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sgc-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .sgc-footer-in { grid-template-columns: 1fr; gap: 2rem; padding: 2.25rem 16px 2rem; } }
body.sgc-site .site-footer, body.sgc-site .site-info { background: #182230; color: #9aa4b2; border-top: 1px solid rgba(255,255,255,.08); }
body.sgc-site .site-info { padding: 1.4rem 0; font-size: .88rem; text-align: center; }
body.sgc-site .site-info .inside-site-info { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
body.sgc-site .site-info .copyright-bar { float: none; text-align: center; }
body.sgc-site .site-info .copyright { color: #c9d0da; font-weight: 600; }
.sgc-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font-weight: 600; }
.sgc-footer-menu li { margin: 0; }
body.sgc-site .sgc-footer-menu a { color: #e9e4d8; text-decoration: none; }
body.sgc-site .sgc-footer-menu a:hover { color: #f6b48a; }
body.sgc-site .site-footer .generate-back-to-top { background: var(--sgc-accent); color: #fff; }
body.sgc-site .post-image img, body.sgc-site .featured-image img { border-radius: var(--sgc-radius); }
body.sgc-site .read-more { color: var(--sgc-accent); font-weight: 700; }
body.sgc-site.blog .inside-article, body.sgc-site.archive .inside-article { background: #fff; border: 1px solid var(--sgc-line); border-radius: var(--sgc-radius); padding: 1.4rem; }
body.sgc-site.blog .entry-title, body.sgc-site.archive .entry-title { font-size: 1.45rem; line-height: 1.2; }
/* guides archive: two-column card grid with the featured image bleeding to the card edge */
@media (min-width: 768px) {
	body.sgc-site.blog #main, body.sgc-site.archive #main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
	body.sgc-site.blog #main > .paging-navigation, body.sgc-site.archive #main > .paging-navigation, body.sgc-site.blog #main > .page-header, body.sgc-site.archive #main > .page-header { grid-column: 1 / -1; }
}
body.sgc-site.blog article, body.sgc-site.archive article { margin-bottom: 1.5rem; }
body.sgc-site.blog .inside-article, body.sgc-site.archive .inside-article { overflow: hidden; display: flex; flex-direction: column; }
body.sgc-site.blog .post-image, body.sgc-site.archive .post-image { order: -1; }
body.sgc-site.blog .entry-summary p:last-child, body.sgc-site.archive .entry-summary p:last-child { margin-bottom: .75rem; }
body.sgc-site.blog .post-image, body.sgc-site.archive .post-image { margin: -1.4rem -1.4rem 1.1rem; }
body.sgc-site.blog .post-image img, body.sgc-site.archive .post-image img { display: block; width: 100%; height: auto; border-radius: 0; }
body.sgc-site.blog .entry-summary, body.sgc-site.archive .entry-summary { color: var(--sgc-fg2); }
body.sgc-site.blog footer.entry-meta, body.sgc-site.archive footer.entry-meta { font-size: .85rem; }
body.sgc-hero-page .entry-header, body.sgc-hero-page .page-header { display: none; }
body.sgc-hero-page .inside-article, body.sgc-hero-page .entry-content { padding-top: 0; }
body.sgc-site .inside-article .entry-content > *:not(.sgc-hero):not(.sgc-layout):not(.sgc-band) { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- generic ---------- */
.sgc-hero *, .sgc-calc *, .sgc-layout *, .sgc-band * { box-sizing: border-box; }
.sgc-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sgc-body); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sgc-accent); margin: 0 0 .9rem; }
.sgc-eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--sgc-accent); }
.sgc-ic { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }

/* ---------- full-width hero band ---------- */
.sgc-hero { position: relative; margin: 0 calc(50% - 50vw) 2.5rem; padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(2rem, 4vw, 3rem); background: var(--sgc-bg2); border-top: 4px solid var(--sgc-accent); border-bottom: 1px solid var(--sgc-line); color: var(--sgc-fg); font-family: var(--sgc-body); overflow: clip; }
.sgc-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .9; background-image:
	radial-gradient(circle at 12% 30%, rgba(31,42,55,.05) 0 4px, transparent 5px),
	radial-gradient(circle at 60% 70%, rgba(31,42,55,.04) 0 3px, transparent 4px),
	radial-gradient(circle at 88% 20%, rgba(194,65,12,.07) 0 4px, transparent 5px),
	radial-gradient(circle at 35% 85%, rgba(31,42,55,.04) 0 2px, transparent 3px); background-size: 240px 200px, 170px 150px, 280px 240px, 210px 180px; }
.sgc-hero::after { content: ''; position: absolute; right: -10%; top: -40%; width: 55%; height: 180%; pointer-events: none; background: radial-gradient(closest-side, rgba(194,65,12,.09), transparent 70%); }
.sgc-hero-in { position: relative; max-width: var(--sgc-max); margin: 0 auto; padding: 0 20px; }
.sgc-hero-text { max-width: 760px; margin-bottom: 1.75rem; }
.sgc-hero h1, .sgc-hero .sgc-h1 { font-family: var(--sgc-display); font-weight: 700; font-size: clamp(2.3rem, 5.6vw, 4.2rem); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 1rem; color: var(--sgc-fg); text-wrap: balance; }
.sgc-hero h1 em, .sgc-hero .sgc-h1 em { font-style: normal; color: var(--sgc-accent); }
.sgc-hero .sgc-sub { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--sgc-fg2); line-height: 1.55; margin: 0 0 1rem; max-width: 62ch; }
.sgc-hero-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .92rem; font-weight: 600; color: var(--sgc-fg2); }
.sgc-hero-ticks li::before { content: '✓'; color: var(--sgc-green); margin-right: .4rem; font-weight: 800; }
.sgc-hero-compact .sgc-hero-text { margin-bottom: 0; }
.sgc-hero-compact h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }

/* ---------- calculator: inputs card + weigh ticket ---------- */
.sgc-calc { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 0; font-family: var(--sgc-body); font-size: 15.5px; line-height: 1.45; color: var(--sgc-fg); }
@media (min-width: 960px) { .sgc-calc { grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); align-items: start; } .sgc-ticket-wrap { position: sticky; top: 1.25rem; } }
.sgc-inputs { background: #fff; border: 1px solid var(--sgc-line); border-radius: var(--sgc-radius); padding: 1.25rem 1.25rem 1rem; box-shadow: var(--sgc-shadow); }
.sgc-calc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--sgc-line); }
.sgc-calc-title { font-family: var(--sgc-display); font-weight: 700; font-size: 1.3rem; }
.sgc-units { display: inline-flex; background: var(--sgc-bg2); border: 1px solid var(--sgc-line); border-radius: 10px; padding: 3px; }
.sgc-unit { appearance: none; border: 0; background: transparent; color: var(--sgc-fg2); font: inherit; font-size: .82rem; font-weight: 700; padding: .45rem .85rem; border-radius: 8px; cursor: pointer; }
.sgc-unit.is-active { background: var(--sgc-slate); color: #fff; }
.sgc-field { margin-bottom: 1rem; }
.sgc-label { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--sgc-fg2); margin-bottom: .4rem; }
.sgc-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--sgc-accent); margin-left: .25rem; font-size: .85rem; }
.sgc-input, .sgc-select { width: 100%; font: inherit; font-size: 1rem; padding: .65rem .8rem; border: 1px solid var(--sgc-line2); border-radius: 10px; background: #fff; color: var(--sgc-fg); min-height: 46px; }
.sgc-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sgc-fg2) 50%), linear-gradient(135deg, var(--sgc-fg2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.sgc-input:focus, .sgc-select:focus { outline: none; border-color: var(--sgc-accent); box-shadow: 0 0 0 3px rgba(194,65,12,.18); }
.sgc-input-sm { width: 6.5rem; min-height: 40px; padding: .4rem .6rem; }
.sgc-input-big { font-family: var(--sgc-display); font-size: 1.7rem; font-weight: 700; }
.sgc-select-inline { width: auto; display: inline-block; min-height: 30px; padding: .2rem 1.8rem .2rem .5rem; font-size: .82rem; background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%; }
.sgc-pills, .sgc-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sgc-pill { font: inherit; font-size: .88rem; font-weight: 600; padding: .5rem .9rem; border-radius: 10px; border: 1px solid var(--sgc-line2); background: #fff; color: var(--sgc-fg2); cursor: pointer; }
.sgc-pill.is-active { background: var(--sgc-slate); border-color: var(--sgc-slate); color: #fff; }
.sgc-chips { margin-top: .5rem; }
.sgc-chip { font: inherit; font-size: .8rem; font-weight: 600; padding: .3rem .65rem; border-radius: 7px; border: 1px solid var(--sgc-line); background: var(--sgc-bg2); color: var(--sgc-fg2); cursor: pointer; }
.sgc-chip:hover { border-color: var(--sgc-accent); color: var(--sgc-accent); }
.sgc-areas { display: flex; flex-direction: column; gap: .5rem; }
.sgc-area-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: end; }
.sgc-remove { font: inherit; font-size: 1.2rem; line-height: 1; width: 40px; height: 46px; border: 1px solid var(--sgc-line2); border-radius: 10px; background: #fff; color: var(--sgc-fg2); cursor: pointer; }
.sgc-remove:hover { color: #b91c1c; border-color: #fca5a5; }
.sgc-link-btn { font: inherit; font-size: .88rem; font-weight: 700; color: var(--sgc-accent); background: none; border: 0; padding: .5rem 0; cursor: pointer; }
.sgc-link-btn:hover { color: var(--sgc-accent2); }
.sgc-density { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .55rem; font-size: .86rem; color: var(--sgc-fg2); }
.sgc-density em { font-style: normal; font-weight: 700; color: var(--sgc-fg); }
.sgc-density-alt { font-size: .8rem; color: var(--sgc-fg3); }
.sgc-field-inline .sgc-inline, .sgc-inline { display: flex; align-items: center; gap: .5rem; }
.sgc-inline em { font-style: normal; font-weight: 700; color: var(--sgc-fg2); }
.sgc-inline-big .sgc-input-big { max-width: 9rem; }
.sgc-layer { border: 1px dashed var(--sgc-line2); border-radius: 12px; padding: .9rem 1rem .1rem; margin: 0 0 1rem; }
.sgc-layer legend { font-family: var(--sgc-display); font-weight: 700; font-size: 1.05rem; padding: 0 .4rem; color: var(--sgc-accent); }
.sgc-calc-note { display: flex; gap: .6rem; align-items: flex-start; margin-top: .9rem; padding: .8rem .9rem; background: var(--sgc-accent-soft); border: 1px solid #f3cdb8; border-radius: 10px; color: #7a3410; font-size: .88rem; }
.sgc-calc-note .sgc-ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--sgc-accent); }

/* weigh ticket */
.sgc-ticket { position: relative; background: var(--sgc-paper); color: var(--sgc-ink); border: 1px solid var(--sgc-line); border-top: 0; border-bottom: 0; padding: 1.4rem 1.5rem 1.2rem; font-family: var(--sgc-mono); font-size: .86rem; box-shadow: 0 24px 48px -28px rgba(31,42,55,.45), 0 2px 0 rgba(31,42,55,.08); }
.sgc-ticket::before, .sgc-ticket::after { content: ''; position: absolute; left: -1px; right: -1px; height: 8px; background: radial-gradient(circle at 6px 0, transparent 0 5px, var(--sgc-paper) 5.5px) 0 0 / 12px 8px repeat-x; }
.sgc-ticket::before { top: -7px; }
.sgc-ticket::after { bottom: -7px; transform: scaleY(-1); }
.sgc-ticket-head .sgc-mark { display: block; margin: 0 auto .5rem; }
.sgc-ticket-head { text-align: center; border-bottom: 1px dashed var(--sgc-line2); padding-bottom: .8rem; margin-bottom: .8rem; }
.sgc-ticket-brand { font-family: var(--sgc-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
.sgc-ticket-kind { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sgc-ink2); margin-top: .2rem; }
.sgc-ticket-rows { display: grid; gap: .45rem; }
.sgc-ticket-row { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.sgc-ticket-row > span:first-child { color: var(--sgc-ink2); flex: none; }
.sgc-ticket-row > span:last-child { text-align: right; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.sgc-ticket-row .sgc-select-inline { background-color: #fff; color: var(--sgc-ink); border-color: var(--sgc-line2); font-family: var(--sgc-mono); font-size: .78rem; min-height: 26px; padding: .15rem 1.6rem .15rem .45rem; }
.sgc-ticket-big { text-align: center; padding: .9rem 0 .7rem; border-top: 1px dashed var(--sgc-line2); border-bottom: 1px dashed var(--sgc-line2); margin: .7rem 0; }
.sgc-ticket-big .sgc-result-big { font-family: var(--sgc-display); font-size: 3.4rem; font-weight: 700; line-height: .95; letter-spacing: -.02em; color: var(--sgc-accent); font-variant-numeric: tabular-nums; }
.sgc-ticket-big .sgc-result-big small { font-family: var(--sgc-display); font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sgc-ink2); margin-left: .3rem; }
.sgc-ticket-big .sgc-result-sub { font-size: 1.05rem; font-weight: 700; margin-top: .35rem; }
.sgc-ticket-big .sgc-result-sub small { font-weight: 400; color: var(--sgc-ink2); }
.sgc-ticket-big .sgc-result-tag { font-size: .72rem; color: var(--sgc-ink2); margin-top: .35rem; }
.sgc-ticket-foot { text-align: center; font-size: .72rem; color: var(--sgc-ink2); margin-top: .8rem; line-height: 1.4; }
.sgc-ticket details { margin-top: .6rem; font-size: .8rem; }
.sgc-ticket summary { cursor: pointer; font-weight: 700; color: var(--sgc-accent); list-style: none; }
.sgc-ticket summary::before { content: '+ '; }
.sgc-ticket details[open] summary::before { content: '− '; }
.sgc-cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.sgc-cost-grid > div:last-child { grid-column: 1 / -1; }
.sgc-ticket .sgc-label { color: var(--sgc-ink2); font-size: .68rem; }
.sgc-ticket .sgc-input, .sgc-ticket .sgc-select { background-color: #fff; color: var(--sgc-ink); border-color: var(--sgc-line2); min-height: 36px; padding: .35rem .5rem; font-family: var(--sgc-mono); font-size: .85rem; }
.sgc-ticket .sgc-select { padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--sgc-ink2) 50%), linear-gradient(135deg, var(--sgc-ink2) 50%, transparent 50%); }
.sgc-how p { margin: .4rem 0 0; }
.sgc-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: .9rem; }
.sgc-tbtn { font: inherit; font-family: var(--sgc-mono); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 6px; border: 1px solid var(--sgc-line2); background: #fff; color: var(--sgc-ink); cursor: pointer; }
.sgc-tbtn:hover { border-color: var(--sgc-ink); }

/* converter */
.sgc-grid-conv { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .sgc-grid-conv { grid-template-columns: 1fr 1fr; } }
.sgc-conv-panel { background: var(--sgc-bg2); border: 1px solid var(--sgc-line); border-radius: 12px; padding: 1.1rem; order: 2; }
.sgc-conv-panel.is-first { order: 1; background: #fff; border-color: var(--sgc-slate); }
.sgc-conv-title { font-family: var(--sgc-display); font-weight: 700; font-size: 1.1rem; color: var(--sgc-fg); margin-bottom: .75rem; }
.sgc-conv-out { margin-top: .75rem; }
.sgc-conv-out .sgc-result-big { font-family: var(--sgc-display); font-size: 2.5rem; font-weight: 700; line-height: 1; color: var(--sgc-accent); font-variant-numeric: tabular-nums; }
.sgc-conv-out .sgc-result-big small { font-size: 1rem; color: var(--sgc-fg2); font-weight: 700; letter-spacing: .04em; }
.sgc-conv-lines { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .9rem; color: var(--sgc-fg2); margin-top: .5rem; }
.sgc-conv-lines span { font-weight: 700; color: var(--sgc-fg); }
.sgc-conv-foot { margin-top: .9rem; font-size: .85rem; color: var(--sgc-fg3); }
.sgc-mode-kg-stone .sgc-inputs, .sgc-mode-stone-kg .sgc-inputs { grid-column: 1 / -1; }

/* ---------- article layout with sticky rail ---------- */
.sgc-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: var(--sgc-max); margin: 0 auto; padding: 0 20px 2rem; font-family: var(--sgc-body); color: var(--sgc-fg); }
@media (min-width: 1024px) { .sgc-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 3.5rem; } .sgc-layout-narrow { grid-template-columns: minmax(0, 760px); justify-content: center; } }
.sgc-rail { display: none; }
@media (min-width: 1024px) { .sgc-rail { display: block; } .sgc-rail-in { position: sticky; top: 1.5rem; } }
.sgc-rail-title { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sgc-fg3); margin: 0 0 .6rem; }
.sgc-rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--sgc-line); }
.sgc-rail li a { display: block; padding: .38rem 0 .38rem .9rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--sgc-fg2); font-size: .92rem; text-decoration: none; line-height: 1.3; }
.sgc-rail li a:hover { color: var(--sgc-fg); }
.sgc-rail li a.is-active { color: var(--sgc-fg); border-left-color: var(--sgc-accent); font-weight: 600; }
.sgc-body { max-width: 760px; min-width: 0; }
.sgc-body > p, .sgc-body li { line-height: 1.7; }
.sgc-body > p { font-size: 1.04rem; }
.sgc-intro { font-size: 1.15rem !important; color: var(--sgc-fg2) !important; }
.sgc-h2, .sgc-body h2 { font-family: var(--sgc-display); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.1; margin: 2.8rem 0 1rem; color: var(--sgc-fg); scroll-margin-top: 1.5rem; }
.sgc-body h3 { font-family: var(--sgc-display); font-weight: 700; font-size: 1.3rem; margin: 1.6rem 0 .5rem; color: var(--sgc-fg); }
.sgc-body h2 + p, .sgc-h2 + p { margin-top: 0; }
.sgc-body a { color: var(--sgc-accent); text-underline-offset: 3px; }

/* cards */
.sgc-cards { display: grid; grid-template-columns: 1fr; gap: .9rem; margin: 1rem 0 1.5rem; }
@media (min-width: 640px) { .sgc-cols-2, .sgc-cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .sgc-cols-3 { grid-template-columns: repeat(3, 1fr); } }
.sgc-card { display: flex; gap: .9rem; align-items: flex-start; padding: 1.05rem 1.1rem; background: #fff; border: 1px solid var(--sgc-line); border-radius: 12px; text-decoration: none !important; color: var(--sgc-fg) !important; box-shadow: 0 1px 2px rgba(31,42,55,.04); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.sgc-card:hover { transform: translateY(-2px); border-color: var(--sgc-accent); box-shadow: var(--sgc-shadow); }
.sgc-card-ic { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--sgc-accent-soft); color: var(--sgc-accent); display: grid; place-items: center; }
.sgc-card-body { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.sgc-card-body strong { font-family: var(--sgc-display); font-size: 1.12rem; line-height: 1.2; }
.sgc-card-body span { font-size: .88rem; color: var(--sgc-fg2); line-height: 1.4; }
.sgc-card-arrow { color: var(--sgc-accent); font-weight: 700; align-self: center; }
.sgc-card-sm { padding: .85rem .95rem; }
.sgc-grid-heading { font-family: var(--sgc-display); font-size: 1.35rem; margin: 1.6rem 0 .4rem; }
.sgc-grid-heading a { text-decoration: none; color: var(--sgc-fg); }
.sgc-grid-heading a:hover { color: var(--sgc-accent); }

/* tables */
.sgc-table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; -webkit-overflow-scrolling: touch; border: 1px solid var(--sgc-line); border-radius: 10px; background: #fff; }
.sgc-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0; color: var(--sgc-fg); }
.sgc-table th, .sgc-table td { padding: .6rem .8rem; text-align: left; border: 0; border-bottom: 1px solid var(--sgc-line); white-space: nowrap; vertical-align: top; }
.sgc-table td { white-space: normal; }
.sgc-table td:first-child { font-weight: 600; }
.sgc-table thead th { background: var(--sgc-slate); color: #fff; font-weight: 600; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; white-space: normal; line-height: 1.25; vertical-align: bottom; }
.sgc-table tbody tr:nth-child(even) { background: var(--sgc-bg2); }
.sgc-table tbody tr:last-child td { border-bottom: 0; }
.sgc-table-note { font-size: .84rem; color: var(--sgc-fg3); margin: -.5rem 0 1.25rem; }
.sgc-table-cols { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 760px) { .sgc-table-cols-2 { grid-template-columns: 1fr 1fr; } .sgc-table-cols-3 { grid-template-columns: repeat(3, 1fr); } }
.sgc-table-conv td { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* formula / example / callout */
.sgc-formula { background: var(--sgc-bg2); border-left: 3px solid var(--sgc-accent); border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin: 1rem 0 1.25rem; font-size: .98rem; line-height: 1.9; }
.sgc-formula code { background: #fff; color: var(--sgc-accent2); border: 1px solid var(--sgc-line); padding: .1rem .5rem; border-radius: 5px; font-size: .9em; font-family: var(--sgc-mono); }
.sgc-example { background: #fff; border: 1px solid var(--sgc-line); border-radius: 12px; padding: 1.1rem 1.3rem; margin: 1rem 0 1.5rem; box-shadow: 0 1px 2px rgba(31,42,55,.04); }
.sgc-example h4 { font-family: var(--sgc-display); font-size: 1.15rem; margin: 0 0 .5rem; color: var(--sgc-accent); }
.sgc-example h4 + ol + h4 { margin-top: 1rem; }
.sgc-example ol { margin: 0 0 0 1.2rem; }
.sgc-example p { margin: .25rem 0 .75rem; }
.sgc-callout { display: flex; gap: .75rem; background: var(--sgc-accent-soft); border: 1px solid #f3cdb8; border-radius: 10px; padding: .95rem 1.1rem; margin: 1rem 0 1.25rem; font-size: .95rem; }
.sgc-callout .sgc-ic { flex: none; color: var(--sgc-accent); margin-top: 2px; }
.sgc-callout p { margin: 0; }
.sgc-twocol { display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; }
@media (min-width: 760px) { .sgc-twocol { grid-template-columns: 1fr 1fr; } }
.sgc-twocol h3 { margin-top: .5rem; }
.sgc-kv { margin: 0 0 1.25rem; padding: 0; list-style: none; display: grid; gap: .4rem; }
.sgc-kv li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .85rem; background: var(--sgc-bg2); border: 1px solid var(--sgc-line); border-radius: 8px; font-size: .95rem; }
.sgc-kv li strong { white-space: nowrap; color: var(--sgc-accent2); }

/* steps */
.sgc-steps-list { counter-reset: sgc; list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.sgc-steps-list li { position: relative; padding: .95rem 1rem .95rem 3.6rem; background: #fff; border: 1px solid var(--sgc-line); border-radius: 10px; }
.sgc-steps-list li::before { counter-increment: sgc; content: counter(sgc); position: absolute; left: 1rem; top: .95rem; width: 1.8rem; height: 1.8rem; border-radius: 8px; background: var(--sgc-slate); color: #fff; font-family: var(--sgc-display); font-weight: 700; font-size: 1rem; display: grid; place-items: center; }
.sgc-steps-list li strong { display: block; font-family: var(--sgc-display); font-size: 1.12rem; margin-bottom: .2rem; }
.sgc-steps-list li p { margin: 0; color: var(--sgc-fg2); }

/* faq */
.sgc-faq { margin: 1.25rem 0 1.5rem; }
.sgc-faq-item { border: 1px solid var(--sgc-line); border-radius: 10px; margin-bottom: .55rem; background: #fff; }
.sgc-faq-item[open] { border-color: var(--sgc-line2); }
.sgc-faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 1.1rem; }
.sgc-faq-item summary::-webkit-details-marker { display: none; }
.sgc-faq-item summary h3 { margin: 0; font-family: var(--sgc-body); font-size: 1.02rem; font-weight: 600; line-height: 1.35; color: var(--sgc-fg); }
.sgc-faq-plus { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--sgc-line2); position: relative; }
.sgc-faq-plus::before, .sgc-faq-plus::after { content: ''; position: absolute; background: var(--sgc-accent); left: 50%; top: 50%; transform: translate(-50%, -50%); width: 10px; height: 2px; }
.sgc-faq-plus::after { width: 2px; height: 10px; }
.sgc-faq-item[open] .sgc-faq-plus::after { display: none; }
.sgc-faq-a { padding: 0 1.1rem 1rem; color: var(--sgc-fg2); }
.sgc-faq-a p:last-child { margin-bottom: 0; }

/* cta, author, features */
.sgc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; background: var(--sgc-slate); color: #fff; border-radius: 14px; padding: 1.25rem 1.4rem; margin: 1.75rem 0; }
.sgc-cta-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #f6b48a; }
.sgc-cta-body { flex: 1 1 260px; }
.sgc-cta-body strong { font-family: var(--sgc-display); font-size: 1.25rem; display: block; margin-bottom: .15rem; color: #fff; }
.sgc-cta-body p { margin: 0; color: #cfd5de; font-size: .95rem; }
.sgc-btn { display: inline-block; background: var(--sgc-accent); color: #fff !important; font-weight: 700; padding: .75rem 1.15rem; border-radius: 10px; text-decoration: none !important; white-space: nowrap; }
.sgc-btn:hover { background: var(--sgc-accent2); }
.sgc-author { display: flex; gap: 1rem; align-items: flex-start; border: 1px solid var(--sgc-line); border-radius: 12px; padding: 1.1rem 1.2rem; margin: 2.5rem 0 1rem; background: var(--sgc-bg2); font-size: .92rem; }
.sgc-author-av { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--sgc-slate); color: #fff; display: grid; place-items: center; }
.sgc-author strong { font-family: var(--sgc-display); font-size: 1.1rem; }
.sgc-author p { margin: .25rem 0 0; color: var(--sgc-fg2); }
.sgc-features { display: grid; grid-template-columns: 1fr; gap: .9rem; margin: 0 0 1.5rem; }
@media (min-width: 640px) { .sgc-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .sgc-features { grid-template-columns: repeat(4, 1fr); } }
.sgc-feature { background: #fff; border: 1px solid var(--sgc-line); border-radius: 12px; padding: 1.1rem; }
.sgc-feature-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--sgc-accent-soft); color: var(--sgc-accent); margin-bottom: .7rem; }
.sgc-feature strong { display: block; font-family: var(--sgc-display); font-size: 1.1rem; margin-bottom: .25rem; }
.sgc-feature p { margin: 0; font-size: .9rem; color: var(--sgc-fg2); }
.sgc-band { max-width: var(--sgc-max); margin: 0 auto 1.5rem; padding: 0 20px; }
.sgc-band .sgc-h2 { margin-top: 1rem; }
.sgc-related { margin-top: 2.5rem; }
.sgc-toc { display: none; }

/* mobile "on this page" */
.sgc-toc-mobile { display: block; background: var(--sgc-bg2); border: 1px solid var(--sgc-line); border-radius: 10px; margin: 0 0 1.25rem; font-size: .92rem; }
.sgc-toc-mobile summary { padding: .8rem 1rem; cursor: pointer; font-weight: 700; color: var(--sgc-fg); }
.sgc-toc-mobile ol { margin: 0; padding: 0 1rem 1rem 2.2rem; color: var(--sgc-fg2); }
.sgc-toc-mobile a { color: var(--sgc-fg2); }
@media (min-width: 1024px) { .sgc-toc-mobile { display: none; } }

@media (prefers-reduced-motion: reduce) { .sgc-card, .sgc-card:hover { transition: none; transform: none; } }
@media print {
	body * { visibility: hidden; }
	.sgc-ticket, .sgc-ticket * { visibility: visible; }
	.sgc-ticket { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
	.sgc-actions { display: none !important; }
}
