/* Phone layouts retain navigation, readable type and comfortable touch targets. */
@media (max-width: 760px) {
  :root {
    scroll-padding-top: 20px;
  }
  .wrap {
    width: calc(100% - 36px);
  }
  .header {
    height: auto;
    padding-top: 18px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .header nav {
    display: flex;
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .header nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 13px;
  }
  .header .button {
    min-height: 42px;
    font-size: 12px;
  }
  .hero {
    padding-top: 31px;
    gap: 25px;
  }
  .hero h1 {
    font-size: clamp(36px, 10.5vw, 51px);
    line-height: 1.13;
    letter-spacing: -1.8px;
  }
  .hero .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 21px;
  }
  .hero-description {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 25px;
  }
  .hero-actions {
    gap: 12px;
  }
  .hero-actions .button {
    min-height: 50px;
  }
  .hero-actions .text-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
  }
  .hero-note {
    font-size: 11px;
    color: #99af8e;
    line-height: 1.6;
  }
  .hero-stage {
    min-height: 386px;
    margin-top: 6px;
  }
  .hero-art {
    height: 300px;
  }
  .hero-art img {
    width: 100%;
    height: 350px;
  }
  .hero-art:before {
    width: 250px;
    height: 250px;
  }
  .stage-top {
    font-size: 9px;
    padding-inline: 8px;
    letter-spacing: 0.5px;
  }
  .evidence-card {
    margin-top: -12px;
    padding: 14px;
    width: 90%;
  }
  .evidence-card strong {
    font-size: 14px;
  }
  .evidence-card span:not(.evidence-symbol) {
    font-size: 11px;
  }
  .stage-caption {
    font-size: 10px;
    color: #94aa88;
    margin-top: 22px;
    letter-spacing: 0;
  }
  .quick-start {
    padding: 22px 18px;
    gap: 22px;
    margin-top: 26px;
  }
  .quick-start .eyebrow {
    font-size: 9px;
    line-height: 1.7;
    letter-spacing: 0.7px;
  }
  .quick-start h2 {
    font-size: 24px;
  }
  .quick-start a {
    font-size: 13px;
    line-height: 1.5;
  }
  .quick-terminal-top {
    font-size: 10px;
    margin-bottom: 10px;
  }
  .quick-terminal code {
    display: block;
    font-size: 12px;
    line-height: 1.95;
    overflow-wrap: anywhere;
  }
  .copy-command {
    min-height: 42px;
    min-width: 56px;
    font-size: 12px;
    padding: 9px 12px;
  }
  .compatibility {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 12px;
    text-align: center;
    padding-top: 20px;
  }
  .compatibility > span {
    grid-column: 1/-1;
    font-size: 10px;
    letter-spacing: 1px;
  }
  .tool-wordmark {
    font-size: 17px;
  }
  .section {
    padding-block: 52px;
  }
  .section .eyebrow,
  .evidence-copy .eyebrow,
  .stack-section .eyebrow {
    font-size: 10px;
    letter-spacing: 1.2px;
    line-height: 1.6;
  }
  .section-heading h2,
  .section h2,
  .faq h2 {
    font-size: 34px;
    letter-spacing: -1.2px;
  }
  .section-heading > p {
    font-size: 16px;
    line-height: 1.7;
  }
  .crew-grid {
    gap: 22px;
  }
  .crew-card {
    padding: 23px;
  }
  .crew-art {
    height: 190px;
    margin-bottom: 20px;
  }
  .crew-art img {
    height: 190px;
    max-width: 240px;
  }
  .crew-select {
    min-height: 44px;
  }
  .small-label {
    font-size: 10px;
    line-height: 1.5;
  }
  .section-footnote {
    font-size: 13px;
    line-height: 1.7;
  }
  .evidence-layout {
    gap: 25px;
  }
  .evidence-copy h2 {
    font-size: 42px;
  }
  .evidence-copy .sample-caption {
    font-size: 12px !important;
    max-width: none !important;
  }
  .scenario-buttons {
    gap: 8px;
  }
  .scenario-buttons button {
    min-height: 44px;
    flex: 1;
    padding: 10px 9px;
    font-size: 13px;
  }
  .run-header {
    padding: 19px 17px;
  }
  .run-body {
    padding: 23px 17px 17px;
  }
  .run-step {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 11px;
  }
  .run-step h3 {
    font-size: 15px;
  }
  .run-step p {
    font-size: 14px;
    line-height: 1.75;
  }
  .run-label {
    font-size: 10px;
    color: #aac397;
  }
  .run-result {
    padding: 14px;
    align-items: flex-start;
  }
  .run-result strong {
    font-size: 13px;
  }
  .run-result div > span {
    font-size: 12px;
    line-height: 1.5;
  }
  .stack-section {
    padding: 25px 22px;
  }
  .stack-state {
    font-size: 10px;
    line-height: 1.7;
  }
  .stack-options h3 {
    font-size: 23px;
  }
  .stack-options p {
    font-size: 15px;
  }
  .get-started .eyebrow {
    font-size: 10px;
    line-height: 1.7;
    letter-spacing: 1px;
  }
  .start-layout h2 {
    font-size: 45px;
  }
  .install-panel {
    border-radius: 10px;
  }
  .terminal-bar {
    padding: 17px 14px;
    font-size: 9px;
    letter-spacing: 0.6px;
    gap: 8px;
  }
  .terminal-body {
    padding: 18px 14px;
  }
  .command-row {
    gap: 8px;
  }
  .command-row code {
    min-width: 0;
    font-size: 12px;
  }
  .command-row .copy-command {
    min-width: 52px;
    flex-shrink: 0;
  }
  .terminal-comment {
    font-size: 12px;
    line-height: 1.7;
  }
  .terminal-footer {
    font-size: 13px;
    min-height: 48px;
    padding: 18px;
  }
  .alpha-note {
    line-height: 1.8;
  }
  .faq-list summary {
    min-height: 60px;
    font-size: 16px;
  }
  .faq-list details p {
    font-size: 15px;
  }
  .footer {
    padding-block: 25px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-links {
    width: 100%;
    justify-content: space-between;
    gap: 15px;
  }
  .footer-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 14px;
  }
  .toast {
    max-width: calc(100% - 28px);
    width: max-content;
    text-align: center;
    bottom: max(18px, env(safe-area-inset-bottom));
  }
  .docs-nav {
    gap: 4px 18px;
    font-size: 14px;
  }
  .docs-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .docs-content h1 {
    font-size: 38px;
  }
  .docs-content pre {
    font-size: 13px;
    padding: 18px;
    max-width: 100%;
  }
}
@media (max-width: 359px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .header .brand {
    font-size: 17px;
  }
  .header .button {
    padding-inline: 10px;
    font-size: 11px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 2px;
  }
  .hero-actions .text-link {
    justify-content: center;
  }
  .hero-note {
    text-align: center;
  }
  .hero-stage {
    min-height: 358px;
  }
  .hero-art {
    height: 275px;
  }
  .hero-art img {
    height: 320px;
  }
  .quick-start {
    padding: 19px 16px;
  }
  .quick-start h2 {
    font-size: 22px;
  }
  .quick-terminal code {
    font-size: 11.5px;
  }
  .section h2,
  .section-heading h2 {
    font-size: 31px;
  }
  .crew-card {
    padding: 21px;
  }
  .stage-top {
    font-size: 8px;
  }
  .evidence-card {
    width: 94%;
  }
  .evidence-card strong {
    font-size: 13px;
  }
  .receipt-number {
    display: none;
  }
  .terminal-dots {
    display: none;
  }
}
