/* SITE COMPONENTS — load after global.css (and legal.css on legal pages) */

:root {
    --ok: #21b77a;
    --warn: #e8890c;
    --danger: #e5484d;
    --rail: 64px;
    --demo-dot: rgba(17, 19, 24, .09);
}

html[data-theme="dark"] {
    --demo-dot: rgba(255, 255, 255, .07);
    --warn: #f5a623;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

svg[aria-hidden] {
    display: block;
}


/* SHARED BITS */

.kbd {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    background: var(--surface-solid);
    color: var(--muted);
    font: 600 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

button.pill:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.pill.on,
.pill[aria-pressed="true"] {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg-2);
}

.band {
    position: relative;
    padding: 96px 0;
}

.band + .band {
    padding-top: 24px;
}

.band-head {
    max-width: 680px;
    margin-bottom: 44px;
}

.band-head h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.2vw, 46px);
    line-height: 1.04;
    letter-spacing: -.048em;
}

.band-head p {
    margin: 0;
    max-width: 60ch;
    color: var(--muted);
    font-size: 16.5px;
    line-height: 1.7;
}

.note {
    margin: 18px 0 0;
    color: var(--faint);
    font-size: 13px;
    line-height: 1.6;
    max-width: 62ch;
}

.note a {
    color: var(--accent);
    font-weight: 650;
}

.note a:hover {
    text-decoration: underline;
}


/* HOME HERO */

.home-hero {
    position: relative;
    padding: 150px 0 60px;
    overflow-x: clip;
}

.home-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -60px;
    width: 900px;
    height: 460px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(71, 118, 255, .14), transparent 68%);
    filter: blur(30px);
    pointer-events: none;
}

.home-hero .container {
    position: relative;
}

.hero-copy {
    max-width: 940px;
    margin: 0 auto 44px;
    text-align: center;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 5.8vw, 72px);
    line-height: 1;
    letter-spacing: -.062em;
    font-weight: 760;
}

.hero-copy p {
    max-width: 58ch;
    margin: 0 auto;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.hero-copy .hero-actions {
    margin-top: 28px;
}

.hero-meta {
    margin-top: 18px !important;
    font-size: 13px !important;
    color: var(--faint) !important;
}


/* LIVE EDITOR DEMO */

.demo {
    width: min(1060px, 100%);
    margin: 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    background: var(--surface-solid);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.demo-top {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 48px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--border);
}

.demo-top .traffic {
    margin-right: 10px;
}

.demo-top .ib {
    width: 32px;
    height: 32px;
}

.demo-title {
    flex: 1;
    text-align: center;
    color: var(--faint);
    font-size: 12px;
    font-weight: 600;
}

.ib {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    transition: background .15s ease, opacity .15s ease;
}

.ib svg {
    width: 18px;
    height: 18px;
}

.ib:hover:not(:disabled) {
    background: var(--surface-soft);
}

.ib:disabled {
    opacity: .3;
    cursor: default;
}

.demo-body {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
}

.rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 0;
    border-right: 1px solid var(--border);
    background: var(--surface-soft);
}

.rail-sep {
    width: 26px;
    height: 1px;
    margin: 5px 0;
    background: var(--border-strong);
}

.rail button {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    transition: background .15s ease, color .15s ease;
}

.rail button svg {
    width: 20px;
    height: 20px;
}

.rail button:hover {
    color: var(--text);
    background: var(--surface-solid);
}

.rail button[aria-pressed="true"] {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(71, 118, 255, .28);
}

.demo-stage {
    position: relative;
    display: grid;
    place-items: center;
    padding: 22px;
    background-color: var(--bg);
    background-image: radial-gradient(var(--demo-dot) 1px, transparent 1px);
    background-size: 18px 18px;
}

.demo-frame {
    width: 100%;
    max-width: 880px;
    padding: 0;
    border-radius: 0;
    transition: padding .35s cubic-bezier(.2, .8, .2, 1),
                background .35s ease,
                border-radius .35s ease;
}

.demo-frame canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1000 / 620;
    border-radius: 6px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
    transition: border-radius .35s ease, box-shadow .35s ease;
}

.demo-frame.framed {
    padding: clamp(14px, 4.5%, 40px);
    border-radius: 18px;
    background: var(--frame, linear-gradient(135deg, #8b5cf6, #ec4899));
}

.demo-frame.framed canvas {
    border-radius: 10px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .35);
}

.demo-tip {
    position: absolute;
    left: 50%;
    bottom: 12px;
    max-width: calc(100% - 28px);
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 19, 26, .9);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    transition: opacity .3s ease;
}

.demo-tip.off {
    opacity: 0;
}

.demo-insp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.insp-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.insp-label {
    color: var(--faint);
    font-size: 12px;
    font-weight: 650;
}

.insp-spacer {
    flex: 1;
}

.swatches {
    display: flex;
    gap: 6px;
}

.swatches button {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--surface-solid);
    box-shadow: 0 0 0 1px var(--border-strong);
    padding: 0;
}

.swatches button[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--accent);
}

.demo-insp [hidden] {
    display: none !important;
}


/* THREE WAYS TO HIDE */

.methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.method {
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.method canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 150;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.method h3 {
    margin: 18px 0 6px;
    font-size: 19px;
    letter-spacing: -.03em;
}

.method p {
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.method-use {
    margin-top: auto !important;
    padding-top: 14px !important;
    color: var(--text) !important;
    font-size: 13px !important;
    font-weight: 650;
}

.method-use.good::before,
.method-use.careful::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--ok);
}

.method-use.careful::before {
    background: var(--warn);
}


/* TOOL TILES  (mark-up tools) */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.tool-tile {
    position: relative;
    padding: 22px 20px 24px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tool-tile:nth-child(4n) {
    border-right: 0;
}

.tool-tile:nth-last-child(-n + 4) {
    border-bottom: 0;
}

.tool-tile .tt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tool-tile .tt-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(71, 118, 255, .1);
    color: var(--accent);
}

.tool-tile .tt-icon svg {
    width: 19px;
    height: 19px;
}

.tool-tile h3 {
    margin: 0 0 5px;
    font-size: 16px;
    letter-spacing: -.02em;
}

.tool-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.style-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}


/* PREPARE:  BEAUTIFY + WATERMARK + CROP */

.duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.panel {
    padding: 26px;
}

.panel h3 {
    margin: 0 0 6px;
    font-size: 21px;
    letter-spacing: -.035em;
}

.panel > p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.beauty-stage {
    display: grid;
    place-items: center;
    padding: var(--bpad, 28px);
    border-radius: 14px;
    background: var(--bbg, linear-gradient(135deg, #8b5cf6, #ec4899));
    transition: padding .3s cubic-bezier(.2, .8, .2, 1), background .3s ease;
}

.beauty-shot {
    width: 100%;
    overflow: hidden;
    border-radius: var(--brad, 12px);
    background: #fff;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .3);
    transition: border-radius .3s ease;
}

.beauty-shot .bar {
    display: flex;
    gap: 5px;
    padding: 9px 11px;
    background: #f1f3f6;
}

.beauty-shot .bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cdd3dc;
}

.beauty-shot .body {
    padding: 14px 16px 18px;
    display: grid;
    gap: 8px;
}

.beauty-shot .ln {
    height: 8px;
    border-radius: 4px;
    background: #e4e8ee;
}

.beauty-shot .ln.dark {
    width: 40%;
    background: #2b3340;
}

.beauty-shot .ln.blk {
    width: 62%;
    height: 14px;
    background: #0b0d10;
    border-radius: 3px;
}

.ctl-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.ctl-row > label,
.ctl-row > .ctl-label {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
}

.ctl-row input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.ctl-row .bgs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bgs button {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--surface-solid);
    box-shadow: 0 0 0 1px var(--border-strong);
}

.bgs button[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--accent);
}

.ctl-row .chips,
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* inspector mock (watermark) */

.insp-mock {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 6px 16px 16px;
}

.insp-mock .ctl-row {
    margin-top: 14px;
}

.fake-range {
    position: relative;
    height: 4px;
    border-radius: 4px;
    background: var(--border-strong);
}

.fake-range::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--v, 50%);
    border-radius: 4px;
    background: var(--accent);
}

.fake-range::after {
    content: "";
    position: absolute;
    top: 50%;
    left: var(--v, 50%);
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent);
}

.fake-input {
    padding: 8px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface-solid);
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pgrid {
    display: grid;
    grid-template-columns: repeat(3, 18px);
    gap: 4px;
}

.pgrid i {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: var(--border-strong);
}

.pgrid i.on {
    background: var(--accent);
}

.wm-tile-preview {
    position: relative;
    height: 110px;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9eef6, #d3dbe8);
}

.wm-tile-preview span {
    position: absolute;
    left: -10%;
    right: -10%;
    top: 50%;
    transform: translateY(-50%) rotate(-18deg);
    display: grid;
    gap: 22px;
    color: rgba(15, 23, 42, .34);
    font-size: 12px;
    font-weight: 650;
    text-align: center;
    white-space: nowrap;
}

.crop-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}


/* EXPORT SHEET MOCK */

.export-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.sheet-mock {
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sheet-mock .sh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 14px;
}

.sheet-mock .sb {
    padding: 6px 18px 18px;
}

.sheet-mock .sf {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}

.seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.seg span,
.seg button {
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
}

.seg .on {
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.btn-mini {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface-solid);
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
}

.btn-mini svg {
    width: 15px;
    height: 15px;
}

.btn-mini.ink {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg-2);
}


/* FACT LIST  (workflow / works the way you do) */

.facts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 40px;
}

.fact {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    padding: 24px 0;
    border-top: 1px solid var(--border-strong);
}

.fact .f-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--accent);
}

.fact .f-icon svg {
    width: 18px;
    height: 18px;
}

.fact h3 {
    margin: 0 0 5px;
    font-size: 16px;
    letter-spacing: -.02em;
}

.fact p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}


/* TRUST BAND */

.trust {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 44px;
}

.trust h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.trust p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.trust ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.trust li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    font-size: 14.5px;
    line-height: 1.55;
}

.trust li svg {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(33, 183, 122, .12);
    color: var(--ok);
}


/* FEATURES PAGE — CATALOG */

.catalog {
    display: grid;
    gap: 56px;
}

.cat {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 40px;
}

.cat-intro h2 {
    margin: 0 0 10px;
    font-size: 28px;
    letter-spacing: -.04em;
}

.cat-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.spec {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.spec-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
    border-bottom: 0;
}

.spec-row .s-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(71, 118, 255, .1);
    color: var(--accent);
}

.spec-row .s-icon svg {
    width: 19px;
    height: 19px;
}

.spec-row h3 {
    margin: 0 0 2px;
    font-size: 15.5px;
    letter-spacing: -.02em;
}

.spec-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.spec-row .s-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.keys-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 40px;
}

.keys-col h3 {
    margin: 0 0 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-strong);
    font-size: 14px;
    letter-spacing: -.01em;
}

.keys-col div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
}

.keys-col div .kk {
    display: flex;
    gap: 4px;
}


/* SECURITY PAGE — STEPS (a true sequence) */

.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 56px;
    padding: 0;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 24px 20px 26px;
    border-right: 1px solid var(--border);
}

.steps li:last-child {
    border-right: 0;
}

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.steps h3 {
    margin: 0 0 6px;
    font-size: 16px;
    letter-spacing: -.02em;
}

.steps p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.compare .panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare .panel ul {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.compare .panel li {
    position: relative;
    padding-left: 24px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.compare .panel li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
}

.compare .panel.caution li::before {
    background: var(--warn);
}

/* legal.css styles .legal ul as a 2-col check grid; keep these lists simple */
.legal .compare ul {
    display: grid;
    grid-template-columns: 1fr;
}


/* LEGAL PAGES — small additions */

.legal .meta {
    margin: 0 0 28px;
    color: var(--faint);
    font-size: 13px;
}

.legal code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    font: 600 12.5px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: var(--text);
}


/* RESPONSIVE */

@media (max-width: 1000px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-tile:nth-child(4n) {
        border-right: 1px solid var(--border);
    }

    .tool-tile:nth-child(2n) {
        border-right: 0;
    }

    .tool-tile:nth-last-child(-n + 4) {
        border-bottom: 1px solid var(--border);
    }

    .tool-tile:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .facts-grid,
    .keys-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .steps li {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 860px) {
    .band {
        padding: 70px 0;
    }

    .duo,
    .export-wrap,
    .trust,
    .compare {
        grid-template-columns: 1fr;
    }

    .methods {
        grid-template-columns: 1fr;
    }

    .cat {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .trust {
        padding: 28px 22px;
    }
}

@media (max-width: 720px) {
    .home-hero {
        padding-top: 128px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    /* tool rail becomes a scrolling row */
    .demo-body {
        grid-template-columns: 1fr;
    }

    .rail {
        flex-direction: row;
        justify-content: flex-start;
        gap: 2px;
        padding: 8px 10px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .rail::-webkit-scrollbar {
        display: none;
    }

    .rail button {
        flex: none;
        width: 42px;
        height: 42px;
    }

    .rail-sep {
        flex: none;
        width: 1px;
        height: 24px;
        margin: 0 5px;
    }

    .demo-stage {
        padding: 12px;
    }

    .demo-title {
        display: none;
    }

    .insp-spacer {
        display: none;
    }

    .facts-grid,
    .keys-table {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .steps li {
        border-right: 0;
    }

    .steps li:last-child {
        border-bottom: 0;
    }

    .spec-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .spec-row > .kbd {
        display: none;
    }
}

@media (max-width: 520px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-tile,
    .tool-tile:nth-child(2n),
    .tool-tile:nth-child(4n) {
        border-right: 0;
    }

    .tool-tile,
    .tool-tile:nth-last-child(-n + 4),
    .tool-tile:nth-last-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .tool-tile:last-child {
        border-bottom: 0;
    }

    .panel {
        padding: 20px;
    }

    .ctl-row {
        grid-template-columns: 70px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .demo-frame,
    .demo-frame canvas,
    .beauty-stage,
    .beauty-shot,
    .demo-tip {
        transition: none;
    }
}

/* small fixes */
.sheet-mock .sh [data-i] {
    display: block;
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.sheet-mock .sh [data-i] svg {
    width: 18px;
    height: 18px;
}

.ctl-row .seg {
    justify-self: start;
}

.legal p + p {
    margin-top: 14px;
}


/* COLOURFUL TEXT — accent colours on headings, labels and key text (all pages) */

/* legal / content pages: section headings in the accent colour */
.legal h2 {
    color: var(--accent);
}
.legal h2:nth-of-type(3n+2) { color: var(--purple); }
.legal h2:nth-of-type(3n+3) { color: var(--pink); }
.legal strong,
.legal code {
    color: var(--accent);
}

/* features page: category titles and tool names */
.cat-intro h2 { color: var(--accent); }
.cat:nth-child(3n+2) .cat-intro h2 { color: var(--purple); }
.cat:nth-child(3n+3) .cat-intro h2 { color: var(--pink); }
.spec-row h3 { color: var(--text); }
.spec-row .s-icon { color: var(--accent); }
.cat:nth-child(3n+2) .spec-row .s-icon { color: var(--purple); }
.cat:nth-child(3n+3) .spec-row .s-icon { color: var(--pink); }
.keys-col h3 { color: var(--accent); }
.keys-col:nth-child(2) h3 { color: var(--purple); }
.keys-col:nth-child(3) h3 { color: var(--pink); }

/* security page: step titles and the two panels */
.steps li:nth-child(5n+1) h3 { color: var(--accent); }
.steps li:nth-child(5n+2) h3 { color: var(--purple); }
.steps li:nth-child(5n+3) h3 { color: var(--pink); }
.steps li:nth-child(5n+4) h3 { color: var(--ok); }
.steps li:nth-child(5n+5) h3 { color: var(--warn); }
.panel h3 { color: var(--ok); }
.panel.caution h3 { color: var(--warn); }

/* home page: card and tile titles */
.method h3,
.tool-tile h3,
.fact h3 { color: var(--accent); }
.tools-grid .tool-tile:nth-child(3n+2) h3,
.facts-grid .fact:nth-child(3n+2) h3 { color: var(--purple); }
.tools-grid .tool-tile:nth-child(3n+3) h3,
.facts-grid .fact:nth-child(3n+3) h3 { color: var(--pink); }

/* footer headings */
.footer-column h4 { color: var(--accent); }
