/*
 * v1.5 Mobile M4 — Homepage Hybrid Tablet architecture.
 *
 * This file owns only 621–900px. Phone and Desktop remain governed by their
 * approved phase styles on either side of this closed interval.
 */

@media (min-width: 621px) and (max-width: 900px) {
  /* Direct, touch-safe navigation without introducing a collapsed state. */
  .masthead-inner {
    min-height: 4rem;
    gap: clamp(.75rem, 2.2vw, 1.5rem);
  }

  .wordmark {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }

  .masthead nav ul {
    gap: clamp(.15rem, 1vw, .65rem);
  }

  .masthead nav a {
    min-height: 2.75rem;
    padding-inline: clamp(.08rem, .45vw, .28rem);
    font-size: clamp(.67rem, 1.45vw, .75rem);
  }

  /* 621–699 starts as a concise semantic stack; 700+ recomposes below. */
  .hero-grid {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-copy {
    padding-block: clamp(2.5rem, 6vw, 3rem) clamp(2rem, 5vw, 2.5rem);
  }

  .hero h1 {
    margin: 1.25rem 0 1.5rem;
    font-size: clamp(4.15rem, 10.5vw, 5.35rem);
    line-height: .86;
  }

  .hero-kicker {
    max-width: 16ch;
    font-size: clamp(2.35rem, 6.5vw, 3.05rem);
    line-height: .97;
  }

  .territory {
    margin-top: 1.35rem;
    font-size: .96rem;
    line-height: 1.45;
  }

  .hero-explanation {
    max-width: 38rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    font-size: .96rem;
    line-height: 1.5;
  }

  .hero-grid .portrait-wrap {
    width: auto;
    height: clamp(24rem, 62vw, 28rem);
    min-height: 0;
    margin-inline: 0;
  }

  .hero-grid .portrait-wrap img {
    object-position: 50% 46%;
    transform: scale(1.02);
  }

  /* Leadership Thesis remains a bridge rather than a second Hero. */
  #thesis {
    padding-block: clamp(3.75rem, 8vw, 5rem);
  }

  #thesis h2 {
    max-width: 11ch;
    margin: 1.75rem 0 0;
    font-size: clamp(3.6rem, 8.2vw, 4.75rem);
    line-height: .9;
  }

  #thesis h2 span {
    color: var(--ink);
  }

  /* Featured Case keeps every proof component while reducing traversal. */
  #featured-case {
    padding-block: clamp(4rem, 7vw, 5rem);
  }

  #featured-case .preview-featured-header {
    gap: 1.5rem;
  }

  #featured-case .preview-featured-header h2 {
    max-width: 14ch;
    margin-top: 1.05rem;
    font-size: clamp(3rem, 7.2vw, 4.2rem);
    line-height: .94;
  }

  #featured-case .goal24-featured-meta {
    gap: .35rem;
  }

  #featured-case .preview-marker,
  #featured-case .preview-meta,
  #featured-case .goal24-kicker,
  #featured-case .goal24-zone-label,
  #featured-case .goal24-question span,
  #featured-case .goal25-guardrails {
    font-size: .72rem;
  }

  #featured-case .goal24-confidentiality {
    font-size: .78rem;
  }

  #featured-case .goal24-featured-lead {
    gap: 1.75rem;
    margin-top: 3rem;
  }

  #featured-case .goal24-tension-text {
    max-width: 20ch;
    margin-top: .8rem;
    font-size: clamp(2rem, 5vw, 2.7rem);
    line-height: 1;
  }

  #featured-case .goal24-context {
    max-width: 39rem;
    margin-top: 1rem;
    font-size: .96rem;
    line-height: 1.5;
  }

  #featured-case .goal24-question {
    grid-template-columns: minmax(6.5rem, .35fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding-block: .85rem;
  }

  #featured-case .goal24-question-old {
    margin-top: .65rem;
  }

  #featured-case .goal24-question strong {
    font-size: 1.05rem;
    line-height: 1.28;
  }

  #featured-case .goal24-routing-artifact {
    margin-top: 2.5rem;
    padding-top: 1rem;
  }

  #featured-case .goal24-routing-grid {
    gap: 0;
    margin-top: 1rem;
  }

  #featured-case .goal24-routing-grid > section {
    padding-block: 1.2rem;
  }

  #featured-case .goal24-zone-title {
    margin-top: .8rem;
  }

  #featured-case .goal24-route-line {
    margin-top: 1.15rem;
    font-size: 1rem;
  }

  #featured-case .goal24-routing-evidence ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem 1rem;
    margin-top: 1rem;
  }

  #featured-case .goal24-routing-after ul {
    gap: .45rem;
    margin-top: 1rem;
  }

  #featured-case .goal24-routing-evidence li,
  #featured-case .goal24-routing-after li {
    padding-top: .55rem;
    font-size: .94rem;
    line-height: 1.28;
  }

  #featured-case .goal24-zone-note,
  #featured-case .goal24-evidence-note,
  #featured-case .goal25-lighter-route small {
    margin-top: .75rem;
    font-size: .78rem;
    line-height: 1.45;
  }

  #featured-case .goal25-lighter-route .goal25-guardrails {
    margin-top: .65rem;
    letter-spacing: .08em;
    line-height: 1.4;
  }

  #featured-case .goal24-validation-strip {
    margin-top: 1.25rem;
    padding-top: 1rem;
  }

  #featured-case .goal24-validation-chain {
    display: grid;
    grid-template-columns: max-content .65rem minmax(0, 1fr) .65rem minmax(0, 1fr);
    gap: .45rem;
    font-size: .72rem;
    letter-spacing: .08em;
    text-align: center;
  }

  #featured-case .goal24-validation-strip > p {
    margin-top: .75rem;
    font-size: .94rem;
    line-height: 1.45;
  }

  #featured-case .goal24-validation-strip .goal24-boundary {
    font-size: .78rem;
  }

  #featured-case .goal24-featured-footer {
    margin-top: 1.75rem;
    padding-top: .85rem;
  }

  #featured-case .preview-cta {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    margin-top: 0;
  }

  /* Selected Work becomes compact, scannable editorial rows. */
  #cases {
    padding-block: clamp(4rem, 7vw, 5rem);
  }

  #cases .section-heading {
    gap: 1rem;
    margin-bottom: 2.25rem;
  }

  #cases .section-heading h2 {
    max-width: 13ch;
    font-size: clamp(3rem, 7.2vw, 4rem);
    line-height: .96;
  }

  #cases .case-item {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: .8rem 1.25rem;
    padding-block: 1.65rem;
  }

  #cases .case-number {
    font-size: 2.8rem;
  }

  #cases .case-item h3 {
    font-size: clamp(1.55rem, 3.6vw, 1.95rem);
    line-height: 1.08;
  }

  #cases .case-category {
    margin-bottom: .55rem;
    font-size: .72rem;
  }

  #cases .case-item p {
    grid-column: 2;
    font-size: .95rem;
    line-height: 1.5;
  }

  #cases .case-action {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }

  /* Twin uses DOM order as visual order: Asset → AI/Risk → Routing/Human → Learning. */
  .current-locked-ai .integration-section {
    min-height: 0;
  }

  .current-locked-ai .integration-layout {
    grid-template-columns: 1fr;
    gap: 2.75rem;
    padding-block: clamp(4rem, 8vw, 5.25rem);
  }

  .current-locked-ai .integration-copy h2 {
    max-width: 11ch;
    margin-top: 1.5rem;
    font-size: clamp(3.4rem, 8.1vw, 4.65rem);
    line-height: .9;
  }

  .current-locked-ai .ai-workflow-thesis {
    max-width: 37rem;
    margin-top: 1.65rem;
    font-size: .96rem;
    line-height: 1.55;
  }

  .current-locked-ai .integration-map {
    min-width: 0;
    margin-top: 0;
  }

  .current-locked-ai .integration-meta {
    gap: .75rem;
    padding-bottom: .7rem;
    font-size: .66rem;
  }

  .current-locked-ai .integration-artifact {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1rem;
    min-height: 0;
    margin-top: 1.25rem;
    isolation: isolate;
  }

  .current-locked-ai .integration-artifact .twin-geometry {
    display: none;
  }

  .current-locked-ai .integration-artifact > .asset-core,
  .current-locked-ai .integration-artifact > .orbit-copy,
  .current-locked-ai .integration-artifact > .edge-rail,
  .current-locked-ai .integration-artifact > .learning-field {
    position: relative;
    inset: auto;
    width: auto;
    min-width: 0;
    margin: 0;
    transform: none;
    order: initial;
    grid-row: auto;
  }

  .current-locked-ai .integration-artifact > .asset-core,
  .current-locked-ai .integration-artifact > .learning-field {
    grid-column: 1 / -1;
  }

  .current-locked-ai .integration-artifact > .orbit-copy,
  .current-locked-ai .integration-artifact > .edge-rail {
    grid-column: auto;
    min-height: 8.75rem;
    padding: 1rem;
    border: 0;
    border-top: 1px solid var(--twin-rule-soft);
    background: transparent;
    text-align: left;
    opacity: 1;
  }

  .current-locked-ai .integration-artifact > .asset-core {
    padding: 1.2rem 1.1rem 1.05rem;
    border-block: 1px solid var(--twin-rule-soft);
    background: transparent;
  }

  .current-locked-ai .asset-core .system-center-wrapper {
    left: auto;
    width: auto;
    transform: none;
  }

  .current-locked-ai .asset-core h2 {
    margin-bottom: .9rem;
    font-size: 1.9rem;
    line-height: .9;
  }

  .current-locked-ai .asset-core ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 .75rem;
  }

  .current-locked-ai .asset-core li {
    padding-block: .5rem;
    font-size: .84rem;
    line-height: 1.3;
  }

  .current-locked-ai .orbit-copy h2,
  .current-locked-ai .edge-rail h2,
  .current-locked-ai .learning-field h2 {
    min-height: 2rem;
    padding: 0 0 .7rem;
    border-bottom: 1px solid var(--twin-rule-faint);
    color: var(--twin-ivory);
    font-size: .72rem;
    line-height: 1.3;
    text-align: left;
  }

  .current-locked-ai .orbit-copy li,
  .current-locked-ai .edge-rail li {
    padding-block: .42rem;
    color: var(--twin-stone);
    font-size: .88rem;
    line-height: 1.3;
  }

  .current-locked-ai .integration-artifact > .learning-field {
    display: block;
    padding: 1rem 1.1rem 1.1rem;
    border-block: 1px solid var(--twin-rule-soft);
    background: transparent;
  }

  .current-locked-ai .learning-field h2 {
    min-height: 0;
  }

  .current-locked-ai .learning-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .current-locked-ai .learning-items span {
    padding: .75rem;
    border-left: 1px solid var(--twin-rule-faint);
    color: var(--twin-stone);
    font-size: .88rem;
    text-align: center;
  }

  .current-locked-ai .learning-items span:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .current-locked-ai .learning-items span:last-child {
    padding-right: 0;
  }

  /* Approved stage cues: one central signal between paired stages, plus a restrained return. */
  .current-locked-ai .integration-artifact > .asset-core::after,
  .current-locked-ai .integration-artifact > .rail-ai::after,
  .current-locked-ai .integration-artifact > .orbit-routing::after {
    position: absolute;
    z-index: 3;
    bottom: -.88rem;
    width: .5rem;
    height: .65rem;
    background: var(--twin-rule);
    clip-path: polygon(44% 0, 56% 0, 56% 58%, 100% 58%, 50% 100%, 0 58%, 44% 58%);
    content: "";
    pointer-events: none;
  }

  .current-locked-ai .integration-artifact > .asset-core::after {
    left: calc(50% - .25rem);
  }

  .current-locked-ai .integration-artifact > .rail-ai::after,
  .current-locked-ai .integration-artifact > .orbit-routing::after {
    left: calc(100% + .25rem);
  }

  .current-locked-ai .integration-artifact > .learning-field::after {
    position: absolute;
    z-index: 2;
    bottom: -.65rem;
    left: 50%;
    height: .65rem;
    border-left: 1px dashed rgba(247, 243, 234, .38);
    content: "";
    pointer-events: none;
  }

  .current-locked-ai .integration-artifact::before {
    position: absolute;
    z-index: 0;
    top: 5.25rem;
    right: -.5rem;
    bottom: -.65rem;
    left: 50%;
    border: 1px dashed rgba(247, 243, 234, .3);
    border-left: 0;
    border-radius: 0 .7rem .7rem 0;
    content: "";
    pointer-events: none;
  }

  .current-locked-ai .integration-artifact::after {
    position: absolute;
    z-index: 2;
    top: 5rem;
    left: calc(50% - .46rem);
    width: 0;
    height: 0;
    border-top: .28rem solid transparent;
    border-right: .46rem solid rgba(247, 243, 234, .48);
    border-bottom: .28rem solid transparent;
    content: "";
    pointer-events: none;
  }

  /* Editorial second half: compact reading rhythm and controlled imagery. */
  #perspectives,
  #about,
  #beyond {
    padding-block: clamp(4rem, 8vw, 5.5rem);
  }

  #perspectives .perspective-intro {
    gap: 1.75rem;
    margin-bottom: 2.75rem;
  }

  #perspectives .perspective-intro h2,
  #about .about-formation-intro h2,
  #beyond .beyond-work-intro h2 {
    font-size: clamp(3.4rem, 7.8vw, 4.5rem);
    line-height: .94;
  }

  #perspectives .perspective-intro > p,
  #about .about-copy p {
    max-width: 39rem;
    font-size: .96rem;
    line-height: 1.55;
  }

  #perspectives .perspective-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1rem;
    padding-block: 1.8rem;
  }

  #perspectives .perspective-list p {
    font-size: clamp(1.8rem, 4.6vw, 2.45rem);
    line-height: 1.06;
  }

  #about .about-formation-intro {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  #about .about-copy {
    padding-top: 0;
  }

  #about .formation-diptych {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-light);
  }

  #about .formation-diptych figure {
    grid-template-rows: auto auto;
    height: auto;
  }

  #about .formation-image-frame {
    height: clamp(11.5rem, 27vw, 15rem);
  }

  #about .formation-diptych figcaption {
    display: grid;
    gap: .35rem;
    min-height: 3.5rem;
    padding-top: .75rem;
  }

  #about .formation-diptych figcaption span:last-child {
    text-align: left;
  }

  #beyond .beyond-work-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #beyond .beyond-work-intro > p {
    max-width: 23ch;
    font-size: clamp(2rem, 4.8vw, 2.6rem);
    line-height: 1.05;
  }

  #beyond .sheltie-spread {
    display: block;
    margin-top: 2.5rem;
  }

  #beyond .sheltie-dominant {
    width: 100%;
  }

  #beyond .sheltie-image-frame {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  #beyond .sheltie-dominant img {
    object-position: 50% 52%;
    transform: scale(1.02);
  }

  #beyond .sheltie-supporting {
    display: none;
  }

  #contact .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding-block: 4rem 3rem;
  }

  #contact .contact-grid > :first-child {
    grid-column: 1 / -1;
  }

  #contact .contact-grid h2 {
    margin-top: 1.1rem;
    font-size: clamp(3.2rem, 7.3vw, 4.25rem);
    line-height: .95;
  }

  #contact .contact-item a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
}

@media (min-width: 700px) and (max-width: 900px) {
  /* Wide Tablet Hero: real two-column identity architecture within one viewport. */
  .hero-grid {
    height: clamp(42rem, calc(100svh - 4rem), 46rem);
    grid-template-columns: minmax(0, 1.06fr) minmax(17rem, .94fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .hero-copy {
    align-self: center;
    padding-block: 3rem;
  }

  .hero h1 {
    font-size: clamp(4rem, 8.2vw, 5.15rem);
  }

  .hero-kicker {
    font-size: clamp(2.2rem, 4.5vw, 2.75rem);
  }

  .hero-grid .portrait-wrap {
    width: auto;
    height: 100%;
    margin-right: 0;
  }

  .hero-grid .portrait-wrap img {
    object-position: 50% 50%;
  }

  #thesis .shell {
    display: grid;
    grid-template-columns: minmax(8.5rem, .36fr) minmax(0, 1.64fr);
    gap: 2.5rem;
    align-items: start;
  }

  #thesis h2 {
    margin: 0;
  }

  #featured-case .preview-featured-header {
    grid-template-columns: minmax(0, 1.45fr) minmax(10rem, .55fr);
    gap: 2.5rem;
  }

  #featured-case .goal24-featured-meta {
    justify-items: end;
    padding-top: .2rem;
    text-align: right;
  }

  #featured-case .goal24-featured-lead {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 4rem);
  }

  #featured-case .goal24-judgment-shift {
    align-self: end;
  }

  #featured-case .goal24-routing-grid {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1fr) minmax(0, 1.18fr);
  }

  #featured-case .goal24-routing-grid > section {
    min-height: 20rem;
    padding: 1.25rem 1rem .9rem;
  }

  #featured-case .goal24-routing-grid > section:first-child {
    padding-left: 0;
    padding-right: 1.25rem;
  }

  #featured-case .goal24-routing-grid > section:nth-child(2) {
    border-top: 0;
    border-inline: 1px solid var(--growth-rule);
  }

  #featured-case .goal24-routing-grid > section:last-child {
    padding-right: 0;
    padding-left: 1.25rem;
    border-top: 0;
  }

  #featured-case .goal24-routing-evidence ul {
    grid-template-columns: 1fr;
  }

  #cases .case-item {
    grid-template-columns: 3.5rem minmax(0, .95fr) minmax(10rem, 1.05fr);
    gap: 1.5rem;
    align-items: end;
  }

  #cases .case-item p {
    grid-column: 3;
  }

  #perspectives .perspective-intro {
    grid-template-columns: minmax(17rem, .9fr) minmax(0, 1.1fr);
    column-gap: clamp(1.5rem, 3.5vw, 2.25rem);
  }

  #beyond .beyond-work-intro {
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
    gap: 3rem;
  }

  #perspectives .perspective-intro > p {
    align-self: end;
  }

  #about .about-formation-intro {
    grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr);
    gap: 3rem;
  }

  #contact .contact-grid {
    grid-template-columns:
      minmax(16.5rem, 1.45fr)
      minmax(9.75rem, 1fr)
      minmax(6rem, .65fr);
    column-gap: clamp(1.5rem, 3.5vw, 2.25rem);
    row-gap: 2rem;
  }

  #contact .contact-grid > :first-child {
    grid-column: auto;
  }

  #contact .contact-grid > * {
    min-width: 0;
  }
}
