@layer reset, base, layout, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, pre, ol { margin: 0; }
  button, input { font: inherit; color: inherit; }
  button, label:has(input), summary { cursor: pointer; }
  svg { display: block; }
  [hidden] { display: none !important; }
  :where(a, button, input, pre):focus-visible { outline: 3px solid #7771d8; outline-offset: 4px; }
}
@layer base {
  :root { font: 16px/1.75 "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; color: #203d33; background: #f4f3ec; --ink: #203d33; --muted: #617367; --green: #007967; --line: #ccd5c9; --paper: #fffef8; --lime: #c5ff80; }
  body { min-width: 320px; background: radial-gradient(ellipse at 95% 0, #dddcef70, transparent 28%); }
  code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
  :not(pre) > code { font-size: .9em; }
  h1 { font-size: clamp(34px, 4.5vw, 68px); line-height: 1.2; letter-spacing: 0; font-weight: 800; margin: 23px 0 20px; }
  h1 > span { color: var(--green); }
  h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.5; }
  h3 { font-size: 18px; line-height: 1.5; }
  a { color: var(--green); text-underline-offset: 4px; }
  a:hover { text-decoration-thickness: 2px; }
  .eyebrow, .kicker { color: var(--green); font-size: 12px; letter-spacing: .1em; font-weight: 750; }
  .kicker { margin-bottom: 5px; }
  .page { width: min(1560px, calc(100% - 80px)); margin-inline: auto; }
  .hero { padding: 38px 0 28px; }
  .eyebrow { display: flex; align-items: center; gap: 12px; }
  .brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 10px; background: var(--lime); color: var(--ink); }
  .brand-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1; }
  .lead { max-width: 1100px; font-size: 16px; }
  .support-row { display: flex; align-items: center; gap: 9px 12px; flex-wrap: wrap; margin-top: 22px; }
  .support-badge { border: 1px solid var(--line); border-radius: 30px; padding: 5px 11px; font-size: 12px; background: var(--paper); }
  .support-badge[data-supported=true] { color: #006652; border-color: #a2bca8; background: #edf5e9; }
  .support-badge[data-supported=false] { color: #994614; border-color: #dcbda8; background: #fff3e6; }
  .support-caption { font-size: 12px; color: var(--muted); }
  .notice { border-left: 3px solid #aa551b; background: #fff1dc; padding: 14px 18px; margin-top: 18px; font-size: 14px; }
  .icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
}
@layer layout {
  .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 23px; overflow: clip; }
  .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
  .subtle-tag { padding: 6px 11px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; color: var(--green); white-space: nowrap; }
  .workspace { display: grid; grid-template-columns: 245px minmax(0, 1fr); }
  .controls { display: flex; flex-direction: column; gap: 16px; padding: 22px 21px; background: #f7f7ef; border-right: 1px solid var(--line); }
  fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
  legend { font-size: 14px; font-weight: 750; margin-bottom: 8px; width: 100%; }
  legend code { display: block; font-size: 11px !important; color: var(--muted); font-weight: 500; }
  legend:has(output) { display: flex; justify-content: space-between; gap: 10px; }
  legend output { color: var(--green); white-space: nowrap; font-size: 13px; }
  input[type=range] { width: 100%; accent-color: #007967; cursor: ew-resize; display: block; min-height: 24px; margin: 0; }
  .control-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 7px; }
  .preview-area { min-width: 0; container-type: inline-size; display: flex; flex-direction: column; }
  .preview-toolbar { padding: 17px 25px; border-bottom: 1px solid var(--line); background: #f8faf3; }
  .width-control { display: flex; gap: 15px; align-items: center; }
  .width-control label { font-size: 14px; font-weight: 700; flex-shrink: 0; }
  .width-control input { flex: 1; min-width: 0; }
  .width-control output { width: 57px; flex-shrink: 0; font: 650 13px/1.5 "SFMono-Regular", Consolas, monospace; color: var(--green); }
  #widthNote { font-size: 11px; color: var(--muted); margin-top: 4px; }
  .preview-stage { flex: 1; background: #e8ede4; background-image: linear-gradient(#c9d6c54a 1px, transparent 1px), linear-gradient(90deg, #c9d6c54a 1px, transparent 1px); background-size: 22px 22px; padding: 26px; }
  .demo-size { margin-inline: auto; background: var(--paper); padding: 20px; box-shadow: 0 8px 25px #203d3310; container-type: inline-size; }
  .preview-readout { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 13px 25px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
  .preview-readout > span { display: flex; align-items: center; gap: 7px; }
  .preview-readout output { margin-left: auto; color: var(--ink); font-weight: 700; }
  .code-section { min-width: 0; background: #172d25; color: #e9f1e5; }
  .code-heading { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #ffffff1d; }
  .code-heading .kicker { color: #a7c4ac; }
  .code-heading h3 { color: #f5f6ec; font-size: 17px; }
  pre { font-size: 13px; line-height: 1.85; tab-size: 2; padding: 22px 24px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
  .code-note { padding: 14px 24px; font-size: 13px; border-top: 1px solid #ffffff1d; color: #b9cdbd; }
  .comparison-section, .notes-section { padding: 38px 0; }
  .section-heading { margin-bottom: 22px; }
  .section-heading > p:last-child:not(.kicker) { font-size: 14px; color: var(--muted); margin-top: 8px; }
  .comparison-grid, .notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .comparison-card, .notes-grid article { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 17px; background: #fffef8c0; }
  .comparison-card h3 { margin: 22px 0 10px; }
  .comparison-card > code { font-size: 13px; color: var(--green); display: block; overflow-wrap: anywhere; }
  .comparison-card p { font-size: 14px; color: var(--muted); margin-top: 12px; }
  .repeat-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .task-preview { padding: 30px 40px; background: #edf1e7; }
  .task-preview header { display: flex; gap: 13px; align-items: center; padding-bottom: 25px; }
  .task-mark { width: 42px; height: 42px; background: var(--ink); color: var(--lime); border-radius: 10px; display: grid; place-items: center; }
  .task-mark svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .repeat-explanation { padding: 30px; }
  .repeat-explanation > p { font-size: 14px; color: var(--muted); margin: 14px 0; }
  .repeat-explanation .code-section { margin-top: 24px; border-radius: 12px; overflow: clip; }
  .repeat-explanation .code-heading { padding: 14px 18px; }
  .repeat-explanation pre { padding: 20px 18px; }
  .notes-grid h3 { margin: 12px 0; }
  .notes-grid p { font-size: 14px; color: var(--muted); }
  .concept-label { color: var(--green); font: 700 12px/1.5 "SFMono-Regular", Consolas, monospace; letter-spacing: .07em; }
  .compatibility { border: 1px solid var(--line); border-radius: 18px; padding: 27px 28px; background: #e7ede1; }
  .compatibility h2 { font-size: 24px; }
  .compatibility > p:not(.kicker) { font-size: 14px; margin: 15px 0; max-width: 1100px; }
  .compatibility nav { display: flex; gap: 12px 25px; flex-wrap: wrap; font-size: 14px; margin-top: 22px; }
  .page-footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding: 26px 0 35px; }
}
@layer components {
  .segmented { display: flex; position: relative; isolation: isolate; padding: 4px; background: #e6ece2; border: 1px solid #c4cfc2; border-radius: 10px; anchor-scope: --choice; }
  .segmented::before { content: ""; position: absolute; z-index: -1; position-anchor: --choice; left: anchor(left); top: anchor(top); width: anchor-size(width); height: anchor-size(height); background: var(--ink); border-radius: 7px; transition: left .18s, top .18s; pointer-events: none; }
  .segmented label { position: relative; display: grid; min-width: 0; flex: 1; text-align: center; font-size: 13px; font-weight: 750; }
  .segmented input { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 7px; cursor: pointer; }
  .segmented label > span { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 8px 7px; min-height: 38px; pointer-events: none; white-space: nowrap; }
  .segmented label svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .segmented label:has(input:checked) { anchor-name: --choice; color: var(--lime); }
  .segmented label:hover { background: #203d330a; border-radius: 7px; }
  .segmented label:has(input:focus-visible) { outline: 3px solid #7771d8; outline-offset: 4px; border-radius: 7px; }
  .segmented input:focus-visible { outline: none; }
  fieldset:disabled { opacity: .55; }
  :disabled { cursor: not-allowed !important; }
  .check-label { display: flex; gap: 9px; align-items: center; font-size: 12px; font-weight: 650; }
  input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--green); flex-shrink: 0; margin: 0; }
  .line-key { width: 19px; height: 3px; background: #087f6b; }
  .row-key { background: #c55a3c; height: 2px; }
  .sample-masthead { display: flex; flex-wrap: wrap; gap: 8px 15px; align-items: center; justify-content: space-between; padding-bottom: 20px; }
  .sample-logo { font-size: 21px; font-weight: 850; line-height: 1.3; display: flex; align-items: center; gap: 2px; }
  .sample-logo > span { font-weight: 450; }
  .sample-logo > i { width: 8px; height: 8px; background: #c55a3c; margin-left: 4px; align-self: end; margin-bottom: 4px; }
  .sample-masthead > span:last-child { font-size: 11px; color: var(--muted); }
  .article-grid { background: var(--paper); }
  .article-grid.show-gaps { background: #e0ecda; }
  .sample-card { min-width: 0; background: var(--paper); }
  .sample-card h3 { font-size: 17px; line-height: 1.55; margin: 5px 0; }
  .sample-card > p:last-child { font-size: 12px; color: var(--muted); }
  .article-category { font-size: 10px; color: var(--green); letter-spacing: .08em; font-weight: 700; margin-top: 12px; }
  .sample-footer { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; padding-top: 20px; font-size: 10px; color: var(--muted); }
  .art { height: 88px; position: relative; overflow: hidden; background: #e3e8d4; isolation: isolate; }
  .art i, .art b { display: block; position: absolute; }
  .art--arch { background: #ead9bd; }
  .art--arch i { width: 116px; height: 113px; background: #628d73; border-radius: 60px 60px 0 0; left: 18%; top: 15px; box-shadow: 85px 23px 0 #354d45; }
  .art--arch b { width: 65px; height: 95px; left: calc(18% + 25px); top: 40px; background: #ead9bd; border-radius: 40px 40px 0 0; }
  .art--circle { background: #c9d9e1; }
  .art--circle i { width: 116px; height: 116px; border-radius: 50%; background: #d9a66b; left: 14%; top: -34px; }
  .art--circle b { width: 170px; height: 100px; border-radius: 50%; border: 18px solid #3c6566; right: -28px; bottom: -45px; transform: rotate(-28deg); }
  .art--steps { background: #dad3e6; }
  .art--steps i { width: 25%; height: 28px; background: #7772a0; left: 10%; top: 20px; box-shadow: 29px 18px 0 #9990b9, 58px 36px 0 #b4a9ce, 87px 54px 0 #c9bddc; transform: skewY(-12deg); }
  .art--steps b { width: 26px; height: 26px; border-radius: 50%; background: #f1d898; right: 12%; top: 10px; }
  .art--window { background: #cbd7bc; }
  .art--window i { width: 150px; height: 125px; border: 13px solid #49674f; top: 17px; left: 15%; transform: rotate(-15deg); box-shadow: 60px 20px 0 #8fa381; }
  .art--window b { width: 150px; height: 5px; background: #f4f0d7; top: 55px; left: 15%; transform: rotate(-15deg); }
  .art--orbit { background: #e3c7bc; }
  .art--orbit i { width: 170px; height: 70px; border: 2px solid #865943; border-radius: 50%; left: 12%; top: 10px; transform: rotate(-20deg); }
  .art--orbit b { width: 58px; height: 58px; border-radius: 50%; background: #c26b4d; left: 36%; top: 15px; box-shadow: 68px -8px 0 -20px #f9e4b4; }
  .art--type { background: #d5dbce; }
  .art--type i { width: 85px; height: 85px; border: 20px solid #315247; border-radius: 50%; left: 22%; top: 19px; }
  .art--type b { width: 22px; height: 110px; background: #7e9a83; left: calc(22% + 68px); top: -15px; transform: rotate(20deg); }
  .mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; column-rule: 3px solid #087f6b; row-rule: 2px solid #c55a3c; rule-inset: 0; }
  .mini-grid i { display: block; height: 38px; background: #e3e8d9; border-radius: 4px; }
  .mini-grid i:nth-child(2n) { background: #d8e1cc; }
  .mini-grid--joined { rule-break: none; }
  .mini-grid--broken { rule-break: intersection; }
  .mini-grid--inset { rule-break: intersection; rule-inset: 10px; }
  .task-list { padding: 0; list-style: none; }
  .task-list li { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; }
  .task-list small { font-size: 10px; color: var(--green); background: #dfe9d6; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
  .copy-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; padding: 8px 12px; min-height: 38px; border: 1px solid #bdcbb8; border-radius: 8px; font-size: 13px; color: var(--ink); background: var(--paper); font-weight: 750; transition: background .18s; }
  .copy-button:hover { background: #d9f0c5; }
  .copy-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .token-number { color: #ffca9f; }.token-property { color: #bceba4; }.token-word { color: #c9c3ff; }
  .toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 10px); z-index: 100; max-width: calc(100% - 32px); padding: 12px 19px; border-radius: 11px; background: var(--ink); color: white; font-size: 14px; box-shadow: 0 5px 22px #0002; opacity: 0; visibility: hidden; transition: .2s; }
  .toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
@layer responsive {
  @container (max-width: 680px) { .preview-toolbar { padding-inline: 18px; }.preview-stage { padding: 20px; }.preview-readout { padding-inline: 18px; }.preview-readout output { width: 100%; margin: 0; } }
  @container (max-width: 400px) { .sample-masthead > span:last-child { width: 100%; }.sample-footer { gap: 5px; }.sample-card h3 { font-size: 17px; } }
  @media (max-width: 1100px) { .workspace { grid-template-columns: 220px minmax(0, 1fr); }.controls { padding: 22px 16px; }.three label { font-size: 12px; }.comparison-card, .notes-grid article { padding: 22px; }.task-preview { padding: 28px; } }
  @media (max-width: 850px) { .page { width: calc(100% - 32px); }.hero { padding-top: 28px; }.workspace { grid-template-columns: 1fr; }.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }.controls > .control-note { grid-column: span 2; margin: 0; }.panel-heading { padding: 22px; }.panel-heading .subtle-tag { display: none; }.comparison-grid, .notes-grid { gap: 14px; }.comparison-card, .notes-grid article { padding: 18px; }.comparison-card h3 { font-size: 16px; }.comparison-card > code { font-size: 11px; }.mini-grid { gap: 14px; }.mini-grid i { height: 30px; }.repeat-explanation { padding: 25px; }.task-preview { padding: 25px; }.repeat-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
  @media (max-width: 620px) { .eyebrow { font-size: 10px; letter-spacing: .04em; }.brand-mark { width: 29px; height: 29px; }.brand-mark svg { width: 20px; height: 20px; }.hero h1 { font-size: clamp(30px, 7vw, 43px); }.lead { font-size: 15px; }.panel { border-radius: 17px; }.panel-heading { padding: 20px 18px; }h2 { font-size: 22px; }.controls { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; gap: 20px 14px; }.controls legend { font-size: 13px; }.controls > .control-note { grid-column: 1/-1; }.segmented label { font-size: 12px; }.segmented label > span { gap: 4px; padding-inline: 5px; }.segmented svg { width: 15px; height: 15px; }.check-label { grid-column: 1/-1; }.width-control { gap: 10px; }.width-control label { font-size: 12px; }.width-control output { font-size: 12px; width: 48px; }.preview-stage { padding: 14px; }.demo-size { padding: 16px; }.preview-readout { font-size: 11px; gap: 8px 15px; }.code-heading { padding: 18px; }.code-heading h3 { font-size: 15px; }.copy-button { font-size: 12px; padding: 8px 10px; }.copy-button svg { display: none; }.live-example > .code-section pre { columns: auto; }pre { font-size: 12px; padding: 18px; }.code-note { padding: 14px 18px; font-size: 12px; }.comparison-grid, .notes-grid { grid-template-columns: 1fr; }.comparison-card, .notes-grid article { padding: 23px; }.mini-grid { gap: 18px; }.mini-grid i { height: 38px; }.comparison-card h3 { font-size: 18px; }.comparison-card > code { font-size: 13px; }.repeat-layout { grid-template-columns: 1fr; }.task-preview { padding: 26px 23px; }.repeat-explanation { padding: 26px 23px; }.compatibility { padding: 23px 20px; }.compatibility h2 { font-size: 22px; }.page-footer { font-size: 10px; } }
  @supports not (left: anchor(left)) { .segmented::before { display: none; }.segmented label:has(input:checked) { background: var(--ink); border-radius: 7px; } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
}
