:root {
    --paper: #f7f6f3;
    --ink: #171a24;
    --muted: #5e6573;
    --line: #e6e3dc;
    --card: #fff;
    --sans: "Plus Jakarta Sans", system-ui, sans-serif;
    --display: "Cal Sans", "Plus Jakarta Sans", sans-serif;
    --shadow: 0 24px 60px -28px rgba(23, 26, 36, .45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.loop { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: -.04em; text-wrap: pretty; }
a, h1, h2, h3, p { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: #e4e0d6; }
[hidden] { display: none !important; }
.loop-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 50; top: 12px; left: 12px; width: auto; height: auto; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 999px; clip: auto; }

.loop-header { position: sticky; top: 0; z-index: 40; padding: 16px 16px 8px; }
.loop--home.loop--news .loop-header { margin-bottom: -88px; }
.loop-pill { width: min(1152px, 100%); margin-inline: auto; min-height: 64px; display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .8); backdrop-filter: blur(18px); box-shadow: 0 4px 24px -8px rgba(15, 23, 42, .12); }
.loop-brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.loop-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; font-weight: 600; }
.loop-mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font: 500 20px/1 var(--sans); }
.loop-nav { display: flex; flex: 1; gap: 18px; justify-content: center; min-width: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.loop-nav a { white-space: nowrap; }
.loop-nav [aria-current], .loop-nav a:hover, .loop-menu-panel a:hover { color: var(--ink); }
.loop-pill-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.search-toggle { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.loop-menu { display: none; position: relative; }
.loop-menu summary { list-style: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.loop-menu summary::-webkit-details-marker { display: none; }
.loop-menu summary span, .loop-menu summary span:before, .loop-menu summary span:after { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
.loop-menu summary span:before, .loop-menu summary span:after { content: ""; position: absolute; left: 0; }
.loop-menu summary span:before { top: -5px; }
.loop-menu summary span:after { top: 5px; }
.loop-menu-panel { position: absolute; right: 0; top: calc(100% + 12px); width: min(260px, 70vw); padding: 8px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.loop-menu-panel a { display: block; padding: 10px 12px; border-radius: 12px; font-weight: 500; }
.loop-search { width: min(720px, calc(100% - 32px)); margin: 10px auto 0; }
.loop-search form { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.loop-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; }
.loop-search input:focus { outline: none; }

.pill, .ink-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 20px; background: var(--ink); color: #fff; font-weight: 500; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.pill:hover, .ink-button:hover { background: #2c3140; color: #fff; }
.pill--ghost { background: rgba(255, 255, 255, .86); color: var(--ink); }
.pill--ghost:hover { background: #fff; color: var(--ink); }
.loop--blog .pill--ghost { background: #efede8; }

.loop-hero { text-align: center; padding: 72px 24px 48px; }
.loop--news .loop-hero { color: #fff; padding: 148px 24px 168px; border-radius: 0 0 40px 40px; background: linear-gradient(180deg, rgba(23, 26, 36, .28), rgba(23, 26, 36, .42)), linear-gradient(160deg, #9aa0ab 0%, #7d8490 42%, #6a717c 100%); }
.loop-kicker { font-size: 14px; font-weight: 500; color: var(--muted); }
.loop--news .loop-hero .loop-kicker, .loop--news .loop-dek { color: rgba(255, 255, 255, .86); }
.loop-hero h1 { font-size: clamp(48px, 8vw, 96px); line-height: .98; margin: 14px 0 16px; }
.loop-dek { max-width: 640px; margin: 0 auto 28px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.loop-hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.loop-stage { width: min(1120px, calc(100% - 40px)); margin: 0 auto 28px; }
.loop--news .loop-stage { margin-top: -112px; }

.window { overflow: hidden; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; background: #f3f2ee; color: var(--muted); font-size: 13px; }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d5d1c8; }
.window-bar span:nth-child(1) { background: #ff5f57; }
.window-bar span:nth-child(2) { background: #febc2e; }
.window-bar span:nth-child(3) { background: #28c840; }
.window-bar em { margin-left: 8px; font-style: normal; }
.window-body { padding: 28px; }
.front-features { display: grid; gap: 18px; }
.loop--news .front-features { grid-template-columns: 1fr 1fr; }
.story { min-width: 0; }
.story-image { display: block; overflow: hidden; border-radius: 20px; background: #eceae4; margin-bottom: 16px; }
.story-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.story h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.08; }
.story-deck { margin-top: 10px; color: #3e4450; font-size: 15px; line-height: 1.55; }
.story-byline, .story-date { margin-top: 12px; font-size: 13px; color: var(--muted); }
.story-byline:empty { display: none; }
.story--lead { display: grid; gap: 28px; align-items: center; }
.loop--news .story--lead { grid-column: 1 / -1; grid-template-columns: 1.05fr .95fr; }
.loop--blog .story--lead { grid-template-columns: 1.05fr .95fr; }
.story--lead .story-image { margin: 0; }
.story--lead .story-image img { aspect-ratio: 4 / 3; }
.story--lead h2 { font-size: clamp(32px, 4vw, 52px); }
.story--secondary { padding: 16px; border-radius: 20px; background: #f7f6f3; }
.story--secondary .story-image { margin-bottom: 12px; }
.story--secondary h2 { font-size: 24px; }
.latest-section { padding: 36px 0 12px; }
.rule-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.rule-title h2 { font-size: clamp(32px, 4vw, 48px); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.loop--blog .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-grid .story, .archive-list .story { background: var(--card); border-radius: 24px; padding: 14px; box-shadow: 0 16px 40px -30px rgba(23, 26, 36, .5); }
.story-grid h2 { font-size: 26px; }
.archive-list { display: grid; gap: 16px; }
.archive-list .story { grid-template-columns: 220px minmax(0, 1fr); display: grid; gap: 20px; align-items: center; padding: 14px; }
.archive-list .story-image { margin: 0; }
.archive-list .story h2 { font-size: 32px; }

.loop-intro { padding: 28px 0 8px; }
.loop-intro h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1; margin-top: 10px; }
.loop-intro p { max-width: 640px; margin-top: 14px; color: var(--muted); }
.loop-split { display: grid; gap: 22px; margin: 22px auto 64px; }
.loop-card, .paper-panel, .aside-widget { background: var(--card); border-radius: 28px; padding: 28px; box-shadow: 0 16px 40px -30px rgba(23, 26, 36, .55); }
.aside-widget .loop-kicker, .paper-panel .loop-kicker { display: block; margin-bottom: 8px; }
.field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.paper-field { display: block; width: 100%; min-width: 0; margin-top: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
textarea.paper-field { min-height: 140px; resize: vertical; }
.form-grid { display: grid; gap: 16px; }
.form-note { color: var(--muted); font-size: 15px; }
.form-note p { margin-bottom: .8em; }
.loop-prose { font-size: 16px; line-height: 1.75; }
.loop-prose p { margin-bottom: 1em; }
.loop-prose h1, .loop-prose h2, .loop-prose h3 { margin: 1.15em 0 .4em; line-height: 1.15; }
.loop-prose h1 { font-size: 34px; }
.loop-prose h2 { font-size: 28px; }
.loop-prose h3 { font-size: 22px; }
.loop-prose a { text-decoration: underline; text-underline-offset: 3px; }
.loop-prose ul, .loop-prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.notice--error { background: #fdecec; border-color: #f3c0c0; color: #8a1f1f; }
.price-list, .check-list { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.price-list li, .check-list li { margin: 6px 0; }

.article-header { max-width: 840px; margin: 36px auto 20px; text-align: center; }
.article-header h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; margin: 12px 0; }
.article-header .story-deck { font-size: 18px; }
.article-image { width: min(1000px, calc(100% - 40px)); margin: 0 auto 36px; border-radius: 28px; overflow: hidden; background: #eceae4; box-shadow: var(--shadow); }
.article-image img { width: 100%; max-height: 640px; object-fit: cover; }
.article-layout { width: min(1080px, calc(100% - 40px)); margin: 0 auto 64px; display: grid; grid-template-columns: minmax(0, 720px) minmax(220px, 280px); gap: 36px; justify-content: center; }
.article-layout--solo { display: block; max-width: 720px; }
.article-sidebar { align-self: start; position: sticky; top: 96px; }
.article-sidebar h2 { font-size: 28px; margin-bottom: 8px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.article-tags a { padding: 6px 12px; border-radius: 999px; background: #efede8; font-size: 13px; font-weight: 500; }
.post-content { font-size: 17px; line-height: 1.75; }
.post-content p, .post-content ul, .post-content ol { margin-bottom: 1.15em; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin: 1.2em 0 .45em; line-height: 1.15; }
.post-content h2 { font-size: 32px; }
.post-content h3, .post-content h4 { font-size: 24px; }
.post-content ul { list-style: disc; padding-left: 1.2em; }
.post-content ol { list-style: decimal; padding-left: 1.2em; }
.post-content a { text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote { margin: 24px 0; padding-left: 18px; border-left: 3px solid var(--ink); font-size: 22px; }
.post-content img, .post-content video, .post-content iframe { max-width: 100%; height: auto; border-radius: 16px; }
.post-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 20px; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 8px 10px; }
.post-content pre { overflow-x: auto; font-size: 14px; }
.story-small { padding: 14px 0; border-bottom: 1px solid var(--line); }
.story-small h3 { font-size: 22px; line-height: 1.15; }
.story-small .story-date { margin-top: 6px; }

.loop-newsletter { padding: 28px 0 8px; }
.loop-newsletter-card { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.loop-newsletter h2 { font-size: clamp(32px, 4vw, 48px); margin: 8px 0; }
.loop-newsletter p { color: var(--muted); }
.newsletter-fields { display: flex; gap: 8px; }
.newsletter-fields .paper-field { border-radius: 999px; }
.loop-footer { padding: 36px 0 28px; text-align: center; }
.footer-name { font-family: var(--display); font-size: 36px; letter-spacing: -.04em; }
.loop-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; margin: 18px 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.loop-footer p { color: var(--muted); font-size: 13px; }
.loop-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; font-size: 14px; }
.loop-pagination__items { display: flex; flex-wrap: wrap; gap: 8px; }
.loop-pagination__page, .loop-pagination__control { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 8px 12px; border-radius: 999px; background: #fff; }
.loop-pagination .is-current { background: var(--ink); color: #fff; }
.loop-pagination .is-disabled { color: #9aa0aa; background: transparent; }
.loop-pagination .is-gap { background: transparent; }
.empty-state { text-align: center; padding: 64px 0; color: var(--muted); }
.center-card { width: min(720px, 100%); margin: 48px auto; text-align: center; }
.center-card h1 { font-size: clamp(36px, 5vw, 56px); margin: 16px 0; }

.loop-setting { padding: 28px 0; }
.loop-setting h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 12px; }
.loop-setting figure { margin-bottom: 18px; }
.loop-setting img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 24px; }
.loop-setting--special { text-align: center; }
.quote-page { background: transparent !important; }
.loop .quote-page h1 { font-family: var(--display); font-weight: 400; letter-spacing: -.04em; font-size: clamp(40px, 6vw, 64px); }
.loop .quote-page button { border-radius: 999px; background: var(--ink); }
.loop .quote-page input, .loop .quote-page select, .loop .quote-page textarea { border-radius: 14px; border-color: var(--line); }

@media (min-width: 800px) {
    .loop-split, .loop-split--aside { grid-template-columns: minmax(0, 1fr) 300px; }
    .loop-split--flip { grid-template-columns: 300px minmax(0, 1fr); }
    .form-grid--2 { grid-template-columns: 1fr 1fr; }
    .loop-setting--left, .loop-setting--right { display: flex; align-items: center; gap: 32px; }
    .loop-setting--right { flex-direction: row-reverse; }
    .loop-setting--left > *, .loop-setting--right > * { flex: 1; min-width: 0; }
}
@media (max-width: 900px) {
    .loop-nav { display: none; }
    .loop-menu { display: block; }
    .loop--news .story--lead, .loop--blog .story--lead, .story-grid, .loop--blog .story-grid, .loop--news .front-features { grid-template-columns: 1fr; }
    .story--lead .story-image { margin-bottom: 0; }
    .archive-list .story { grid-template-columns: 1fr; }
    .loop-newsletter-card, .newsletter-fields { grid-template-columns: 1fr; display: grid; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .loop--home.loop--news .loop-header { margin-bottom: -76px; }
    .loop--news .loop-hero { padding: 120px 16px 120px; }
    .loop--news .loop-stage { margin-top: -72px; }
}
@media (max-width: 640px) {
    .loop-shell, .loop-stage, .article-image, .article-layout { width: calc(100% - 28px); }
    .loop-brand strong { max-width: 120px; }
    .window-body, .loop-card, .paper-panel, .aside-widget { padding: 18px; }
    .loop-hero h1 { font-size: 46px; }
    .loop-pagination { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
