@layer reset, base, layout, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, pre, dl, dd { 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(36px, 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; }
  .page { width: min(1560px, calc(100% - 80px)); margin-inline: auto; }
  .hero { padding: 38px 0 28px; }
  .eyebrow, .kicker { color: var(--green); font-size: 12px; letter-spacing: .1em; font-weight: 750; }
  .kicker { margin-bottom: 5px; }
  .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); }
  .brand-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
  .lead { max-width: 1140px; }
  .support-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; margin-top: 22px; font-size: 12px; color: var(--muted); }
  .support-badge { border: 1px solid var(--line); border-radius: 30px; padding: 5px 11px; 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; }
  .notice { border-left: 3px solid #aa551b; background: #fff1dc; padding: 14px 18px; margin-top: 18px; font-size: 14px; }
  .icon-defs, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@layer layout {
  .panel { border: 1px solid var(--line); border-radius: 23px; overflow: clip; background: var(--paper); }
  .panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
  .tag { padding: 6px 11px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; color: var(--green); white-space: nowrap; }
  .lab-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); }
  .controls { background: #f5f7ee; border-right: 1px solid var(--line); padding: 23px; }
  fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
  legend { font-size: 14px; font-weight: 750; margin-bottom: 10px; }
  .range-control, .content-controls { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
  .range-control label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 750; margin-bottom: 9px; }
  .range-control output { font-family: "SFMono-Regular", Consolas, monospace; color: var(--green); }
  .range-control p, .content-controls > p { font-size: 12px; color: var(--muted); }
  input[type=range] { display: block; min-height: 24px; margin: 0 0 5px; width: 100%; accent-color: var(--green); cursor: ew-resize; }
  .content-controls legend { float: left; width: 100%; }
  .content-controls > p { clear: both; margin-bottom: 8px; }
  .content-controls > label { display: flex; gap: 9px; align-items: center; min-height: 32px; font-size: 14px; }
  .content-controls code { margin-left: auto; color: var(--muted); font-size: 12px; }
  input[type=checkbox] { width: 17px; height: 17px; margin: 0; accent-color: var(--green); flex-shrink: 0; }
  .guide-control { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
  .reset-button { margin-top: 14px; width: 100%; }
  .comparison { padding: 23px 26px; min-width: 0; background: #e8ede4; background-image: linear-gradient(#c9d6c54a 1px, transparent 1px), linear-gradient(90deg, #c9d6c54a 1px, transparent 1px); background-size: 22px 22px; container: comparison / inline-size; }
  .legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: #52675b; margin-bottom: 19px; }
  .legend > span { display: flex; align-items: center; gap: 6px; }
  .swatch { width: 12px; height: 12px; border: 1px solid #203d3320; border-radius: 3px; }
  .margin-swatch { background: #efb69e; }.gap-swatch { background: #c7bfdf; }.padding-swatch { background: #c5ddab; }
  .cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .comparison-card { min-width: 0; background: #fffef8cc; border: 1px solid #bfccba; border-radius: 15px; overflow: clip; }
  .native-card { border-color: #739e83; box-shadow: 0 0 0 2px #0079670b; }
  .comparison-heading { padding: 16px 18px; border-bottom: 1px solid var(--line); min-height: 89px; }
  .example-label { font-size: 12px; font-weight: 700; color: var(--muted); }
  .comparison-heading h3 { font-size: 14px; margin-top: 6px; overflow-wrap: anywhere; }
  .native-card .comparison-heading { background: #e4f0dc; }.native-card .comparison-heading h3 { color: #006652; }
  .sample-stage { padding: 24px 17px; min-height: 370px; }
  .sample-shell { position: relative; }
  .sample { background: #fffefb; border: 1px solid #82947e; border-radius: 2px; color: #283e34; writing-mode: horizontal-tb; }
  .sample > * { position: relative; z-index: 1; }
  .sample h3 { font-size: 19px; line-height: 1.4; letter-spacing: 0; }
  .sample p { font-size: 14px; line-height: 1.8; }
  .sample ul { padding-inline-start: 21px; font-size: 13px; line-height: 1.9; }
  .sample .sample-caption { font-size: 12px; color: #617367; border-top: 1px solid #ccd5c9; padding-top: 8px; }
  .guides { position: absolute; inset: 0; pointer-events: none; --pad: 24px; }
  .padding-guide { position: absolute; inset: 1px; border: var(--pad) solid #c5ddab60; }
  .content-outline { position: absolute; inset: calc(var(--pad) + 1px); border: 1px dashed #62865f65; }
  .margin-band, .gap-band { position: absolute; background: repeating-linear-gradient(-45deg, #efb69e88 0 4px, #efb69e44 4px 8px); }
  .gap-band { background: #b8a9d340; }
  .guides-off .guides { visibility: hidden; }
  .measurements { padding: 13px 17px; border-top: 1px solid var(--line); background: #fffef8; }
  .measurements > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
  .measurements dt { font-size: 12px; color: var(--muted); }.measurements dd { font: 700 14px/1.7 "SFMono-Regular", Consolas, monospace; }
  .native-card .measurements dd { color: var(--green); }
  .comparison-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 21px; padding: 18px 20px; border: 1px solid #c6d2be; border-radius: 12px; background: #f8faf2; }
  .comparison-summary > div { display: flex; flex-direction: column; align-items: start; gap: 5px; }
  .comparison-summary span { font-size: 12px; color: var(--muted); }.comparison-summary output { font: 750 24px/1.5 "SFMono-Regular", Consolas, monospace; color: var(--green); }
  .comparison-summary small { display: block; font-size: 10px; }
  .comparison-summary > p { grid-column: 1/-1; font-size: 12px; color: var(--muted); }
  .code-section { background: #172d25; color: #e9f1e5; }
  .code-heading { padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; 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; padding: 22px 24px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
  .code-section > pre { max-height: 360px; }
  .code-note { padding: 14px 24px; font-size: 13px; border-top: 1px solid #ffffff1d; color: #b9cdbd; }
  .syntax-section, .notes-section { padding-top: 38px; }
  .section-heading { margin-bottom: 22px; }.section-heading > p:last-child:not(.kicker) { font-size: 14px; color: var(--muted); margin-top: 9px; }
  .syntax-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); overflow: clip; }
  .syntax-grid > article { min-width: 0; padding: 26px; }.syntax-grid > article + article { border-left: 1px solid var(--line); }
  .syntax-grid h3 { margin-top: 19px; font-size: 18px; }.syntax-grid p { margin-top: 8px; font-size: 14px; color: var(--muted); }
  .mini-box { padding: 10px; border: 1px solid #819b7b; background: #e9f0df; width: 100%; max-width: 140px; display: grid; gap: 0; }
  .mini-box i { display: block; height: 12px; background: repeating-linear-gradient(-45deg, #efb69eaa 0 4px, #efb69e44 4px 8px); }
  .mini-box b { display: block; height: 15px; background: #fffef8; border: 1px solid #94aa8f; }.mini-box b + b { margin-top: 10px; }
  .mini-start > i:first-child, .mini-both > i:first-child, .mini-end > i:last-child, .mini-both > i:last-child { height: 0; }
  .notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .notes-grid article { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: #fffef8b0; }
  .note-mark { font: 750 11px/1.5 "SFMono-Regular", Consolas, monospace; color: var(--green); letter-spacing: .04em; }
  .notes-grid h3 { margin: 12px 0; }.notes-grid p { font-size: 14px; color: var(--muted); }
  .fallback-section { margin-top: 38px; }.fallback-section h2 { font-size: 24px; }
  .fallback-body { padding: 24px 28px; font-size: 14px; }.fallback-toolbar { margin: 18px 0; }
  .fallback-body pre { border-radius: 12px; background: #172d25; color: #e9f1e5; }.fallback-note { color: var(--muted); margin-top: 18px; }
  .compatibility { margin-top: 38px; 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; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 12px; padding: 26px 0 35px; }
}
@layer components {
  .segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; position: relative; isolation: isolate; padding: 4px; background: #e6ece2; border: 1px solid #c4cfc2; border-radius: 11px; 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: 8px; transition: left .18s, top .18s; pointer-events: none; }
  .segmented label { position: relative; display: grid; min-width: 0; 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: 8px; cursor: pointer; }
  .segmented label > span { display: grid; place-content: center; min-height: 58px; padding: 7px 3px; pointer-events: none; }.segmented small { display: block; font: 10px/1.7 "SFMono-Regular", Consolas, monospace; font-weight: 500; }
  .segmented label:has(input:checked) { anchor-name: --choice; color: var(--lime); }
  .segmented label:hover { background: #203d330a; border-radius: 8px; }
  .segmented label:has(input:focus-visible) { outline: 3px solid #7771d8; outline-offset: 2px; border-radius: 8px; }.segmented input:focus-visible { outline: none; }
  :disabled { cursor: not-allowed !important; }fieldset:disabled, input:disabled { opacity: .6; }
  .copy-button, .reset-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; 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, .reset-button:hover { background: #d9f0c5; }.copy-button:active, .reset-button:active { background: #c7e7af; }
  .copy-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .token-property { color: #bceba4; }.token-comment { color: #a2bcaa; }.token-value { color: #ffca9f; }
  .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 comparison (max-width: 680px) { .cards-grid { gap: 12px; }.comparison-heading { padding: 14px 12px; }.comparison-heading h3 { font-size: 12px; }.sample-stage { padding: 20px 10px; }.sample h3 { font-size: 17px; }.sample p { font-size: 13px; }.sample ul { font-size: 12px; }.measurements { padding: 12px; }.measurements dt { font-size: 11px; }.measurements dd { font-size: 12px; } }
  @container comparison (max-width: 520px) { .cards-grid { grid-template-columns: 1fr; }.comparison-heading { min-height: 0; padding: 15px 18px; }.comparison-heading h3 { font-size: 14px; }.sample-stage { min-height: 0; padding: 23px 17px; }.sample h3 { font-size: 19px; }.sample p { font-size: 14px; }.sample ul { font-size: 13px; }.measurements { padding: 13px 17px; }.measurements dt { font-size: 12px; }.measurements dd { font-size: 14px; }.comparison-summary { grid-template-columns: 1fr; padding: 18px; }.comparison-summary > div { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }.comparison-summary output { font-size: 18px; flex-shrink: 0; } }
  @media (max-width: 1100px) { .lab-layout { grid-template-columns: 240px minmax(0, 1fr); }.controls { padding: 20px; }.comparison { padding: 23px 20px; }.syntax-grid > article { padding: 22px; }.notes-grid { gap: 14px; }.notes-grid article { padding: 22px; } }
  @media (max-width: 850px) { .page { width: calc(100% - 32px); }.hero { padding-top: 28px; }.lab-layout { grid-template-columns: 1fr; }.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; border-right: 0; border-bottom: 1px solid var(--line); }.range-control, .content-controls, .guide-control { border: 0; margin: 0; padding: 0; }.content-controls { grid-row: span 2; }.trim-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }.trim-choices small { font-size: 10px; }.controls > fieldset:first-child { grid-column: 1/-1; }.reset-button { margin: 0; align-self: end; }.panel-heading { padding: 22px; }.panel-heading .tag { display: none; }.syntax-grid { grid-template-columns: 1fr 1fr; }.syntax-grid > article:nth-child(3) { border-left: 0; }.syntax-grid > article:nth-child(n+3) { border-top: 1px solid var(--line); }.notes-grid { grid-template-columns: 1fr; } }
  @media (max-width: 520px) { h1 { font-size: clamp(32px, 7.4vw, 40px); }.lead { font-size: 15px; }.panel { border-radius: 17px; }.panel-heading { padding: 20px 18px; }h2 { font-size: 22px; }.controls { padding: 20px 18px; gap: 20px 18px; }.range-control label { font-size: 12px; flex-wrap: wrap; gap: 2px 10px; }.content-controls { grid-column: 1/-1; grid-row: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 18px; }.content-controls > p { grid-column: 1/-1; margin: 0; }.content-controls legend { float: none; width: auto; }.content-controls label { font-size: 13px; }.content-controls code { font-size: 11px; }.guide-control { font-size: 12px; }.reset-button { font-size: 12px; }.comparison { padding: 20px 16px; }.legend { font-size: 11px; gap: 8px 12px; }.code-heading { padding: 18px; flex-wrap: wrap; }.code-heading h3 { font-size: 16px; }pre { font-size: 12px; padding: 18px; }.code-note { padding: 14px 18px; font-size: 12px; }.syntax-grid > article { padding: 20px 16px; }.syntax-grid h3 { font-size: 16px; }.syntax-grid p { font-size: 13px; }.fallback-body { padding: 22px 18px; }.fallback-section h2, .compatibility h2 { font-size: 22px; }.compatibility { padding: 23px 20px; }.page-footer { font-size: 11px; } }
  @supports not (left: anchor(left)) { .segmented::before { display: none; }.segmented label:has(input:checked) { background: var(--ink); border-radius: 8px; } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
}
