@media screen {
  #studio .studio-head { align-items: end; }
  #studio .studio-head h2 { font-size: clamp(1.85rem, 3.5vw, 3rem); }
  .studio-head p { margin: .45rem 0 0; color: var(--muted); }
  #studio .parts {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 1.15rem 0 0;
    padding: 1px;
    border: 0;
    border-radius: .65rem;
    background: #55485f;
    box-shadow: none;
  }
  #studio .parts button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .18rem;
    min-width: 0;
    min-height: 58px;
    margin: 0;
    padding: .65rem .8rem;
    border: 0;
    border-radius: 0;
    background: #211d2b;
    color: var(--ink);
    text-align: start;
    font: 600 1rem/1.2 "Space Grotesk", sans-serif;
    box-shadow: none;
  }
  #studio .parts button[aria-pressed=true] { color: #a9eee5; background: #243337; box-shadow: inset 0 -3px #80e2db; }
  #studio .parts button:hover { background: #362d40; }
  #studio .parts button:focus-visible { outline: 2px solid white; outline-offset: -3px; }
  .section-name { overflow-wrap: anywhere; }
  .section-value { color: #c4bace; font-size: .82rem; line-height: 1.25; font-weight: 400; overflow-wrap: anywhere; }
  #studio .layout { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); align-items: start; gap: clamp(.85rem, 2vw, 1.6rem); margin-block-start: 1rem; }
  .settings-column { display: grid; gap: 1rem; min-width: 0; container: builder-column / inline-size; }
  .comparison-section { position: relative; min-width: 0; }
  .phone-comparison {
    min-width: 0;
    scroll-margin-top: 1rem;
    border: 1px solid #584d64;
    border-radius: .85rem;
    background: linear-gradient(125deg, #24202d, #191721 80%);
    color: #ddd7e5;
  }
  .phone-comparison > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 48px;
    padding: 1rem clamp(.8rem, 3cqw, 1.4rem);
    list-style: none;
    cursor: pointer;
  }
  .phone-comparison > summary::-webkit-details-marker { display: none; }
  .phone-comparison > summary::after {
    content: "";
    flex-shrink: 0;
    width: .48rem;
    height: .48rem;
    margin-inline-end: .2rem;
    border: solid #c5bacc;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
  }
  .phone-comparison[open] > summary::after { transform: rotate(225deg); }
  .phone-comparison h3 { min-width: 0; margin: 0 44px 0 0; overflow-wrap: anywhere; color: #f2ecf5; font-size: clamp(1.32rem, 4cqw, 1.7rem); line-height: 1.2; }
  .comparison-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: -.25rem 0 .85rem; padding-inline: clamp(.8rem, 3cqw, 1.4rem); color: #d6cbd5; font-size: .84rem; line-height: 1.4; }
  .comparison-key span { display: inline-flex; align-items: center; gap: .48rem; }
  .comparison-available { --status-fill: #254333; --status-ink: #d1f4dc; --status-edge: #79bd93; --status-mark: "✓"; --status-name: "Available. "; }
  .comparison-partial { --status-fill: #503622; --status-ink: #ffdab0; --status-edge: #e29a57; --status-mark: "◐"; --status-name: "Partial or conditional. "; }
  .comparison-yellow { --status-fill: #494020; --status-ink: #fff1b3; --status-edge: #dec659; }
  .comparison-limited { --status-fill: #482933; --status-ink: #ffd3d7; --status-edge: #ce7b87; --status-mark: "−"; --status-name: "Missing the control shown. "; }
  .comparison-key span::before { content: var(--status-mark) / ""; display: grid; place-items: center; width: 1em; height: 1em; flex: none; border: 1px solid var(--status-edge); border-radius: .15rem; background: var(--status-fill); color: var(--status-ink); line-height: 1; }
  .phone-comparison table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .92rem; line-height: 1.42; }
  .phone-comparison th, .phone-comparison td { padding: .72rem clamp(.45rem, 1.5cqw, .8rem); border-block-start: 1px solid #484051; text-align: start; vertical-align: top; overflow-wrap: break-word; }
  .phone-comparison thead th { padding-block: .72rem; background: #292530; color: #efe8f4; font-size: .97rem; vertical-align: middle; }
  .phone-comparison thead th:first-child { width: 23%; }
  .phone-comparison thead th:nth-child(2) { box-shadow: inset 0 2px #80ded0; color: #c0fff4; background: #263d3d; }
  .phone-comparison thead img { width: 1.1rem; height: 1.1rem; margin-right: .35rem; vertical-align: -.15rem; }
  .phone-comparison tbody th { font-weight: 600; color: #f0e9f4; }
  .phone-comparison tbody td { background: var(--status-fill); color: var(--status-ink); box-shadow: inset 2px 0 var(--status-edge); }
  .comparison-value::before { content: var(--status-mark) / var(--status-name); color: var(--status-edge); margin-inline-end: .3em; font-weight: 700; }
  .comparison-detail strong, .comparison-detail small { display: block; }
  .comparison-detail strong { font-size: 1rem; line-height: 1.3; }
  .comparison-detail small { margin-top: .35rem; font-size: .84rem; }
  .comparison-detail td p { margin: .45em 0 0; color: inherit; font-size: inherit; line-height: inherit; }
  .phone-comparison a { color: #abe4da; text-decoration: underline; text-underline-offset: .18em; }
  .comparison-section .comparison-help { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; min-width: 28px; min-height: 28px; vertical-align: middle; text-decoration: none; color: #b4e9df; }
  .comparison-help > span { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 1px solid #68978f; border-radius: 50%; font-size: .85rem; font-weight: 700; line-height: 1; }
  .comparison-help:is(:hover, :focus-visible) > span { background: #31544d; border-color: #a4e6d8; color: white; }
  .comparison-section .comparison-heading-help { position: absolute; z-index: 1; inset: .55rem calc(clamp(.8rem, 3cqw, 1.4rem) + .75rem) auto auto; min-width: 44px; min-height: 44px; }
  /* Place the start of an answer near the middle, leaving room to read underneath. */
  #top { padding-block-end: var(--question-end-space, 0px); }
  :is(.feature-list, #faq, .comparison-notes) [id][tabindex="-1"],
  :is(.feature-list, #faq, .comparison-notes) summary,
  #compare-code-ownership, #spectre-contact {
    scroll-margin-block-start: calc((100dvh - var(--question-toolbar-height, 0px)) * .42);
  }
  @media (pointer: coarse) {
    .comparison-section .comparison-help { min-width: 44px; min-height: 44px; }
  }
  .comparison-notes { padding: 0 clamp(.8rem, 3cqw, 1.4rem); border-top: 1px solid #484051; }
  .comparison-notes summary { padding: .75rem 0; min-height: 44px; cursor: pointer; font-size: .9rem; }
  .comparison-notes .answer-body { margin-block: .25rem 1.2rem; font-size: 1rem; }
  .comparison-notes .answer-body > section + section { margin-block-start: 1.65em; }
  .comparison-notes section > p + p { margin-block-start: .75em; }
  .comparison-notes .note-sources { display: flex; flex-wrap: wrap; gap: .3em 1.15em; margin-block-start: .35em; }
  .comparison-notes .note-sources a { max-inline-size: 100%; }
  @media (pointer: coarse) {
    .comparison-notes .note-sources a { min-block-size: 44px; align-content: center; }
  }
  @container builder-column (max-width: 31rem) {
    .phone-comparison table, .phone-comparison tbody { display: block; }
    .phone-comparison thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .phone-comparison tbody tr { display: grid; }
    .phone-comparison tbody th { padding: .7rem .8rem .45rem; color: #fff; background: #2b2633; }
    .phone-comparison tbody td { display: grid; grid-template-columns: minmax(5.5rem, 29%) minmax(0, 1fr); gap: .45rem; padding: .48rem .8rem; border-top: none; }
    .phone-comparison tbody td::before { font-weight: 600; }
    .phone-comparison tbody td:nth-child(2)::before { content: "Spectre" / ""; }
    .phone-comparison tbody td:nth-child(3)::before { content: "GrapheneOS" / ""; }
    .phone-comparison tbody td:nth-child(4)::before { content: "iPhone" / ""; }
    .phone-comparison .comparison-detail small { margin-top: .15rem; }
  }
  @container builder-column (max-width: 17rem) {
    .phone-comparison > summary { position: relative; display: block; padding-block-start: 48px; }
    .phone-comparison h3 { margin: 0; }
    .phone-comparison > summary::after { position: absolute; top: 17px; right: 17px; margin: 0; }
    .comparison-section .comparison-heading-help { inset: 1px 44px auto auto; width: 44px; height: 44px; }
    .phone-comparison tbody td { grid-template-columns: minmax(0, 1fr); gap: .12rem; }
    .phone-comparison tbody td::before { font-size: .85em; }
  }
  .schematic-column {
    background: #191720;
    border: 1px solid #5c506b;
    border-radius: .85rem;
  }
  #studio .stage {
    border: 0;
    border-radius: .8rem .8rem 0 0;
    background-color: #181522;
    background-image: radial-gradient(ellipse at center, #5c49705e 0%, transparent 65%), linear-gradient(#9d82b817 1px, transparent 1px), linear-gradient(90deg, #9d82b817 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
    box-shadow: none;
  }
  #studio .stage-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .12rem .65rem;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid #504459;
    background: #211c2c;
  }
  .stage-top [data-copy] { font-size: .7rem; letter-spacing: .09em; color: #c5b9d4; }
  #studio .stage-top .device-model { grid-column: 1; font: 600 1.1rem/1.25 "Space Grotesk", sans-serif; }
  .stage-top .view-switch { grid-column: 2; grid-row: 1 / 3; display: flex; border: 1px solid #645570; border-radius: .35rem; }
  .stage-top .view-switch button { min-height: 44px; min-width: 46px; padding: .3rem .6rem; border: none; background: transparent; border-radius: .25rem; box-shadow: none; color: #c9bed4; font: 500 .89rem/1.2 "Space Grotesk",sans-serif; }
  .stage-top .view-switch button[aria-pressed=true] { color: white; background: #484052; }
  #studio .node span {
    position: absolute;
    left: var(--label-left);
    top: var(--label-top);
    transform: translateY(-50%);
    width: var(--label-width);
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: .25rem 2px;
    border: 1px solid #766584;
    border-radius: .35rem;
    background: #211c2b;
    color: #ece4f5;
    font: 500 .87rem/1.2 "Space Grotesk", sans-serif;
    text-align: center;
    overflow-wrap: anywhere;
  }
  #studio .node:is(.selected, :hover, :focus-visible) span { border-color: var(--signal); color: var(--signal); background: #233337; }
  #studio .node:focus-visible span { outline: 2px solid var(--signal); outline-offset: 2px; }
  .part-leader {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
    fill: none;
    stroke: #ad99c3;
    stroke-width: 1.25;
    stroke-linejoin: round;
  }
  .node:is(.selected, :hover, :focus-visible) .part-leader { stroke: var(--signal); stroke-width: 2; }
  #studio .node i { z-index: 1; }
  #studio .stage .hint { margin: 0; padding: .25rem .75rem .7rem; font: 400 .88rem/1.4 "Space Grotesk",sans-serif; }
  #studio .pricebar { margin: 0; padding: .8rem 1rem; gap: .7rem; flex-direction: row; border: 0; border-top: 1px solid #52455e; border-radius: 0; background: #24212d; box-shadow: none; }
  #studio .pricebar strong { color: #eee4ff; font-size: 1.6rem; }
  #studio .pricebar .primary { width: auto; min-height: 44px; padding-inline: 1rem; }
  #studio .pricebar #open-crypto-estimate { min-height: 32px; margin: .1rem 0 0; padding: .15rem 0; }
  #studio .saved-build-actions { padding: .25rem .9rem; border-top: 1px solid #45394f; }
  #studio .saved-build-actions #save-device-build { padding: .3rem 0; border: 0; background: none; box-shadow: none; color: var(--accent); text-decoration: underline; }
  #studio .controls { padding: clamp(1rem, 2.2vw, 1.65rem); border-radius: .85rem; border-color: #5c506b; background: linear-gradient(130deg, #28232f, #1b1923 75%); box-shadow: none; }
  .controls { container: settings-panel / inline-size; }
  #builder-panel h3 { margin: 0 0 .7rem; font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
  #lockdown-overview { margin: .4rem 0 1rem; padding: 0 .75rem; }
  #lockdown-heading { padding-block: .65rem; min-height: 44px; color: #b8e9e4; }
  #lockdown-overview details[open] { padding-bottom: .75rem; }
  #options .choice-hint { margin: .2rem 0; color: #c9c0d3; font-size: .92rem; line-height: 1.4; }
  #options .option { border-color: #574b61; border-radius: .45rem; background: #1c1923; cursor: pointer; }
  #options .option:has(input:checked) { border-color: #80c6c0; background: #203030; }
  #options .option input { accent-color: #91d7d0; }
  .app-group { border-top: 1px solid #51485c; }
  .app-group > summary {
    min-height: 44px;
    padding: .7rem .15rem;
    cursor: pointer;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .app-group > summary::marker { color: #a8d7d1; }
  .app-group > summary small { margin-inline-start: .65em; color: #addbd4; font-weight: 500; }
  .app-group > .option:last-child { margin-bottom: .85rem; }
  .build-settings { display: grid; gap: 1rem; }
  .build-setting { min-width: 0; }
  .build-setting .security-choice { margin-bottom: .2rem; }
  .build-setting .choice-hint { display: block; }
  .build-setting .choice-hint[hidden] { display: none; }
  .build-setting .choice-request { margin-bottom: 0; }
  .lock-timing legend { color: var(--ink); font-size: 1.05rem; font-weight: 600; }
  .lock-timing .option { align-items: baseline; }
  @container settings-panel (min-width: 33rem) {
    .build-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .build-settings > :not(.build-setting), .build-settings > .lock-timing, .build-settings > .build-setting:nth-child(4):last-child { grid-column: 1 / -1; }
    .lock-timing fieldset { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; }
    .lock-timing .option { gap: .45rem; padding: .7rem .5rem; margin: 0; }
    .lock-timing .option strong { display: block; margin-bottom: .25rem; }
  }
  #options .mapping-layout nav { align-self: start; }
  #app-install-help { margin-block: .5rem 1rem; }
  #app-install-help p { max-width: 65ch; margin: 0; line-height: 1.5; }
  #app-install-help p + p { margin-top: .45rem; }
  #app-install-help a { color: var(--signal); text-decoration: underline; text-underline-offset: .2em; }
  #cyber-tools-info { margin-top: .8rem; padding: .6rem .85rem; border-inline-start: 2px solid var(--signal); background: #212d30; }
  #cyber-tools-info strong { display: block; }
  #cyber-tools-info a { display: inline-flex; align-items: center; min-height: 44px; color: var(--signal); text-decoration: underline; text-underline-offset: .2em; }
  .drawer-navigation { justify-content: space-between; align-items: center; gap: .65rem; }
  .drawer-navigation label { display: grid; gap: .1rem; color: var(--muted); font-size: .78rem; }
  #drawer-section { min-width: 0; max-width: 100%; height: max(44px, 2.5em); padding: .3rem .55rem; font-size: 1rem; }
}
@media screen and (min-width:761px) and (not ((pointer:coarse) and (orientation:landscape) and (max-width:960px) and (max-height:540px))) {
  #studio .device { min-height: 15rem; }
  #studio .device .assembly { width: min(94%, clamp(14rem, 36vh, 20rem), max(9rem, calc(200% - 21rem))); }
  #studio .schematic-column {
    position: sticky;
    top: min(var(--schematic-top, .75rem), calc(100dvh - var(--schematic-height) - .75rem));
  }
}
@media screen and (min-width:761px) and (max-width:960px) and (height > 650px) {
  #studio .schematic-column { --schematic-top: calc(var(--section-nav-height, 44px) + .75rem); }
}
@media screen and (min-width:601px) and (max-width:1023px) {
  #studio .parts { grid-template-columns: repeat(4, minmax(0,1fr)); }
  #studio .parts button:first-child { grid-column: span 2; }
}
@media screen and (max-width:760px), screen and (pointer:coarse) and (orientation:landscape) and (max-width:960px) and (max-height:540px) {
  #studio .layout { grid-template-columns: minmax(0,1fr); margin-block-start: .75rem; }
  #studio .stage { block-size: auto; }
  #studio .stage .device { block-size: clamp(17rem, 40svh, 23rem); min-height: 0; }
  #studio .stage .assembly { width: min(94cqw, calc(100cqh * 320 / 420), 23rem, max(40cqw, calc(200cqw - 16rem))); }
  #studio .stage #open-settings { min-height: 44px; margin-block-end: .65rem; }
  #studio .node span { font-size: .875rem; }
  #settings-drawer[open] { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(min(8rem, 40dvh),1fr) auto; overflow-y: auto; container: build-drawer / size; }
  #settings-drawer .controls { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .drawer-navigation > * { min-width: 0; }
  .drawer-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; padding: .6rem 1rem max(.6rem,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #231e2d; }
  .drawer-total div { color: var(--muted); font-size: .85rem; }
  .drawer-total strong { display: block; color: var(--ink); font-size: 1.35rem; line-height: 1.1; }
  .drawer-total button { min-height: 44px; padding-inline: 1rem; }
  @container build-drawer (max-width: 16rem) or (max-height: 15rem) {
    .drawer-navigation, .drawer-total { padding-inline: 12px; gap: 4px 8px; }
    .drawer-navigation { flex-wrap: wrap; padding-block: max(4px,env(safe-area-inset-top)) 4px; }
    .drawer-navigation #close-settings, .drawer-total button { padding: 4px 8px; }
    .drawer-navigation label { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
    .drawer-total { padding-block: 4px max(4px,env(safe-area-inset-bottom)); }
    .drawer-total div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .3rem; }
    .drawer-total strong { font-size: 1.05rem; }
  }
  @container build-drawer (max-height: 15rem) {
    .drawer-navigation { position: static; }
    #settings-drawer .controls { overscroll-behavior-y: auto; }
  }
}
@media screen and (pointer: coarse) {
  #studio .pricebar #open-crypto-estimate, .controls .request-toggle { min-height: 44px; }
  @supports not (appearance: base-select) {
    .controls .security-choice select, #market { height: max(44px, 2.75em); }
  }
}
@media screen and (pointer: coarse) and (min-width: 901px) {
  .controls .security-choice select { height: max(44px, 2.75em); }
}
@media screen and (max-width:600px) {
  #studio .parts { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8rem, calc(50% - 1px))), 1fr)); margin-top: .85rem; }
  #studio .parts button { min-height: 48px; padding: .45rem .7rem; gap: .12rem; }
  #studio .parts button:first-child { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  #studio .studio-head > label { width: fit-content; max-width: 100%; }
  #studio .stage { grid-template-areas: none; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto auto; }
  #studio .stage > * { grid-area: auto; }
  #studio .pricebar { align-items: center; }
  #settings-drawer .controls { padding-inline: .9rem; }
}
@media screen and (forced-colors: active) {
  #studio .parts button, #options .option { border: 1px solid ButtonText; }
  #studio .parts button[aria-pressed=true], #options .option:has(:checked) { border: 2px solid Highlight; }
}

@media screen and (max-width:760px), screen and (pointer:coarse) and (orientation:landscape) and (max-width:960px) and (max-height:540px) {
  #studio .parts {
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: .375rem; overflow-x: auto; overscroll-behavior-x: contain;
    padding: .15rem 0 .45rem; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #746780 transparent;
    margin-block: .85rem 0; background: transparent; border-radius: 0;
  }
  #studio .parts button, #studio .parts button:first-child {
    flex: 0 0 auto; width: max-content; min-width: clamp(8rem, 38%, 11.5rem); max-width: min(82%,17rem);
    flex-direction: column; align-items: flex-start; justify-content: center;
    min-height: 52px; padding: .45rem .65rem; border: 1px solid #51475e; border-radius: .5rem; scroll-snap-align: start;
  }
  #studio .parts button[aria-pressed=true] { border-color: #699c98; box-shadow: inset 0 -2px #80e2db; }
  #studio .layout { margin-block-start: .4rem; }
  #studio .stage #open-settings { color: #c5f8ef; background: #223636; border-color: #577f79; }
}
@media screen and (max-width:760px) and (orientation:portrait) {
  .studio-content { width: min(42rem, calc(100% - clamp(1.5rem, 8vw, 2.75rem))); }
  #studio .studio-head { gap: .65rem; }
  #studio .studio-head p { margin-top: .3rem; line-height: 1.4; }
  #studio .studio-head > label { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .85rem; width: 100%; }
  #studio .studio-head select { width: auto; max-width: 100%; }
  #studio .studio-head > label::after { content: none; }
  #studio .stage .device { block-size: clamp(14rem, 36svh, 22rem); }
  #studio .pricebar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .35rem .6rem; }
  #studio .pricebar > div { display: contents; }
  #studio .pricebar span { grid-area: 1 / 1; }
  #studio .pricebar strong { grid-area: 2 / 1; }
  #studio .pricebar small { grid-area: 3 / 1 / 4 / -1; }
  #studio .pricebar #checkout { grid-area: 1 / 2 / 3 / 3; max-width: 100%; }
  #studio .pricebar #open-crypto-estimate { grid-area: 4 / 1 / 5 / -1; justify-self: start; }
}
@media screen and (max-width:760px) and (max-height:650px) and (orientation:portrait) {
  #studio .studio-head p { display: none; }
  #studio .studio-head > label { display: grid; grid-template-columns: 4.5rem minmax(0,1fr); gap: .5rem; }
  #studio .parts { margin-block-start: .5rem; }
  #studio .stage .device { block-size: clamp(11.5rem, 35svh, 14rem); }
}
@media screen and (pointer:coarse) and (orientation:landscape) and (max-width:960px) and (max-height:540px) {
  #studio .stage .device { block-size: clamp(12rem, 52svh, 15rem); }
}

/* Section shortcuts occupy the desktop gutter. Narrow screens use one text-labelled row. */
.section-rail { display: none; }
@media screen {
  .section-rail {
    z-index: 5;
    display: flex;
    color: #bdb3ca;
    font: .81rem/1.2 "Space Mono", monospace;
  }
  .section-rail a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
  }
  .section-rail svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
  .section-rail a:is(:hover, :focus-visible) { color: #f3eafe; background: #332b42; }
  .section-rail a:focus-visible { z-index: 1; outline: 2px solid #d5c2fc; outline-offset: -2px; }
  .section-rail a[aria-current] { color: #a8e2db; background: #203033; }
}
@media screen and (min-width: 961px) {
  body {
    --section-rail-width: clamp(3.5rem, 4.8vw, 5rem);
    --desktop-page-gap: clamp(1rem, 2vw, 2rem);
    --studio-content-start: max(calc(var(--section-rail-width) + var(--desktop-page-gap)), calc((100% - 1180px) / 2));
  }
  .section-rail {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: var(--section-rail-width);
    display: grid;
    align-content: safe center;
    justify-items: center;
    row-gap: clamp(.375rem, 1vh, .625rem);
    padding: 0;
    background: transparent;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .section-rail a {
    isolation: isolate;
    --icon-size: clamp(1.5rem, 2vw, 1.875rem);
    width: max(44px, 2.875rem);
    height: max(44px, 2.875rem);
  }
  .section-rail svg { width: var(--icon-size); height: var(--icon-size); stroke-width: 1.55; }
  .section-rail span { display: none; }
  .section-rail a::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(100%, calc(var(--icon-size) + .55rem));
    height: min(100%, calc(var(--icon-size) + .55rem));
    border-radius: 27%;
  }
  .section-rail a:is(:hover, :focus-visible, [aria-current]) { background: transparent; }
  .section-rail a:hover::before { background: rgb(216 198 244 / 9%); }
  .section-rail a[aria-current]::before { background: rgb(127 216 202 / 12%); }
  .section-rail a:focus-visible { outline: none; }
  .section-rail a:focus-visible::before { outline: 2px solid #d5c2fc; outline-offset: -2px; }
  .landing-inner, .studio-content {
    width: min(1180px, calc(100% - var(--studio-content-start) - var(--desktop-page-gap)));
    margin-inline-start: var(--studio-content-start);
    margin-inline-end: auto;
  }
}
@media screen and (max-width: 960px) {
  html {
    --section-nav-height: calc(44px + env(safe-area-inset-top));
    --question-toolbar-height: var(--section-nav-height);
    scroll-padding-block-start: var(--section-nav-height);
  }
  .section-rail {
    position: sticky;
    top: 0;
    justify-content: center;
    flex-wrap: wrap;
    container: page-shortcuts / inline-size;
    padding-block-start: env(safe-area-inset-top);
    background: #18151f;
    box-shadow: inset 0 -1px #574b6366;
  }
  .section-rail a { flex: 1 1 0; max-width: 8rem; gap: .35rem; padding: .35rem .25rem; font: 550 .86rem/1.15 "Space Grotesk", sans-serif; }
  .section-rail span { min-width: 0; overflow-wrap: anywhere; }
  .section-rail a[aria-current] { box-shadow: inset 0 -2px #87cfc6; }
  .landing-inner { min-height: calc(100svh - var(--section-nav-height)); }
}
@container page-shortcuts (max-width: 26rem) {
  .section-rail a { flex-direction: column; gap: 2px; }
  .section-rail svg { width: 16px; height: 16px; }
}
@container page-shortcuts (max-width: 16rem) {
  .section-rail a { flex: 1 1 50%; max-width: none; flex-direction: row; gap: .35rem; }
}
@media screen and (max-width: 960px) and (max-height: 650px) {
  html { --question-toolbar-height: 0px; scroll-padding-block-start: 0; }
  .section-rail { position: relative; }
  #top { scroll-margin-block-start: var(--section-nav-height); }
}
@media screen and (forced-colors: active) {
  .section-rail a[aria-current] { outline: 2px solid Highlight; outline-offset: -4px; color: LinkText; }
}

.setup-privacy {
  margin-block-start: .75rem;
  padding-inline: .85rem;
  border-inline-start: 2px solid #92c9c2;
  background: #1b2329;
}
.setup-privacy > summary {
  padding-block: .65rem;
  color: #d9f0ec;
  font-weight: 600;
  cursor: pointer;
}
.setup-privacy > summary::marker { color: #92c9c2; }
.setup-privacy > p { max-width: 72ch; margin: 0; padding-block-end: .65rem; }
.credential-notice {
  margin-block: .5rem 1rem;
  border-inline-start: 2px solid #92c9c2;
  padding-inline-start: .75rem;
  line-height: 1.5;
}
.request-privacy, #signal-privacy {
  flex-basis: 100%;
  color: #d9d2e2;
  font-size: .9rem;
  line-height: 1.45;
}
#signal-privacy { display: block; }

#review .copy-control, #copy-signal.copy-control {
  display: inline-grid;
  place-items: center;
  max-inline-size: 100%;
  min-block-size: 44px;
  padding: .45rem .8rem;
  border: 1px solid #766389;
  border-radius: .3rem;
  background: linear-gradient(155deg, #362e43, #211d2a);
  color: #ece1ff;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.copy-control > span, .copy-control::after { grid-area: 1 / 1; }
.copy-control::after {
  content: "✓ Copied" / "";
  visibility: hidden;
}
.copy-control[data-copy-result] > span { opacity: 0; }
.copy-control[data-copy-result]::after { visibility: visible; }
.copy-control[data-copy-result="failed"]::after { content: "Retry" / ""; }
#review .copy-control[data-copy-result="copied"], #copy-signal[data-copy-result="copied"] {
  border-color: #8bd7c7;
  background: #1d3b35;
  color: #c8fae9;
}
#review .copy-control[data-copy-result="failed"], #copy-signal[data-copy-result="failed"] {
  border-color: #eb9b99;
  background: #40292f;
  color: #ffd8d3;
}
@media (prefers-reduced-motion: no-preference) {
  .copy-control[data-copy-result="copied"]::after { animation: copy-confirm .16s ease-out; }
  @keyframes copy-confirm { from { opacity: .35; } to { opacity: 1; } }
}
#checkout-build-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
#checkout-build-actions[hidden] { display: none; }
#checkout-build-actions button { min-height: 44px; max-width: 100%; }
#checkout-build-state {
  margin: .6rem 0;
  padding: .65rem .85rem;
  border-inline-start: 3px solid #8b8295;
  background: #26232d;
  overflow-wrap: anywhere;
}
#checkout-build-state[data-state="warning"] { border-color: #ed9996; background: #39232a; color: #ffdbd6; }
#checkout-build-state[data-state="local"] { border-color: #c7a5ed; background: #30273c; color: #eadbf8; }
#checkout-build-state[data-state="received"] { border-color: #85d2c1; background: #20332e; color: #cef4e8; }

/* Fragment links move focus to reading landmarks. Mark the text for keyboard
   navigation while keeping the standard focus rings on interactive controls. */
@media screen {
  :is(#top, #studio, #phone-details, #faq, #quick-navigation, #spectre-contact,
      #compare-code-ownership, .answer-body, .answer-body div, h2, h3, h4, p)[tabindex="-1"]:focus-visible {
    outline: none;
  }
  #top:focus-visible #hero-title, #studio:focus-visible #studio-title,
  #phone-details:focus-visible #details-heading, #faq:focus-visible #faq-title,
  #quick-navigation:focus-visible #quick-title,
  #spectre-contact:focus-visible > [data-copy], #compare-code-ownership:focus-visible,
  :is(.answer-body, .answer-body div)[tabindex="-1"]:focus-visible > :first-child,
  :is(h2, h3, h4, p)[tabindex="-1"]:focus-visible {
    text-decoration-line: var(--reading-focus-line, underline);
    text-decoration-color: var(--signal);
    text-decoration-thickness: .11em;
    text-underline-offset: .16em;
  }
  html[data-pointer-navigation] { --reading-focus-line: none; }
  html:not([data-pointer-navigation]) #quick-navigation:focus-visible #quick-toggle:not([hidden]) {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
  }
}
