/**
 * Innet — Mobile contract (<768)
 * Canon: docs/BRAND-BOOK.md §4c
 * Load last among layout CSS. Dense desktop rows MUST stack here.
 */

@media (max-width: 767px) {
  /* Shell: full width + padding (no 70/75vw squeeze) */
  #page-root,
  #page-root:has(> .home-quiet),
  #page-root:has(> .home-page),
  #page-root:has(> .page-editorial--about),
  html[data-vision~="large"] #page-root:has(> .home-quiet),
  html[data-vision~="large"] #page-root:has(> .home-page) {
    max-width: none;
    width: 100%;
    padding-inline: 1rem;
  }

  body.is-member-page #page-root {
    max-width: none;
    padding-inline: 0.85rem;
  }

  /* Header lockup */
  .header-shell {
    padding-inline: 0.75rem;
  }

  .logo-mark.logo-mark--img {
    width: clamp(3.25rem, 22vw, 4.25rem);
  }

  .header-left .tagline {
    display: none !important;
  }

  .header-left .logo-text {
    font-size: 0.9375rem;
  }

  .header-inner--v3 .header-actions {
    gap: 0.15rem;
  }

  .header-member-dock__inner {
    gap: 0.5rem;
  }

  .header-member-dock__title .page-title {
    font-size: 1.0625rem;
  }

  .header-member-dock__tabs {
    width: auto;
    max-width: 100%;
    align-self: center;
    justify-content: center;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
  }

  .header-member-dock__title {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
  }

  .header-member-dock__title .workspace-id {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Home quiet */
  .home-quiet {
    min-height: 0;
    align-items: flex-start;
    padding-top: 0.5rem;
  }

  .hero-quiet {
    padding: 0.75rem 0 1.5rem;
  }

  .hero-quiet .brand-hero,
  .hero-quiet .page-title--hero {
    font-size: clamp(2.15rem, 9vw, 2.75rem);
    line-height: 1.08;
  }

  .hero-quiet .page-lead--hero {
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero-quiet .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .hero-quiet .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .home-quiet-links {
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.8125rem;
  }

  /* About / privacy */
  .page-editorial--about {
    padding-block: 0.25rem 1.5rem;
  }

  .page-editorial--about .about-hero .page-title {
    max-width: none;
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .page-editorial--about .about-hero .page-lead {
    font-size: 0.9375rem;
  }

  .about-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem 0.75rem;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
  }

  .about-toc a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.75rem;
  }

  .page-editorial--about .about-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .page-editorial--about .about-layers__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.5rem 0;
  }

  .page-editorial--about .values-grid--flat {
    grid-template-columns: 1fr;
  }

  .page-editorial--about .about-principles__item {
    gap: 0.5rem;
  }

  .page-editorial--about .about-principles__n {
    font-size: 1.25rem;
  }

  .privacy-page.page-editorial--about .privacy-layer-grid--flat {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /* Reset editorial @720 grid-column:2 (implicit 2nd col) */
  .privacy-schema__toolbar,
  .privacy-schema__toolbar:has(.privacy-learned:not([hidden])) {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .privacy-schema__toolbar .privacy-schema__foot,
  .privacy-schema__toolbar .privacy-learned,
  .privacy-schema__toolbar .privacy-schema__actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .privacy-schema__toolbar .privacy-schema__foot {
    order: 1;
  }

  .privacy-schema__toolbar .privacy-learned {
    order: 2;
    justify-self: start;
    font-size: 0.95rem;
  }

  .privacy-schema__toolbar .privacy-schema__actions {
    order: 3;
    justify-self: stretch;
  }

  .privacy-schema__toolbar .privacy-reveal-btn {
    width: 100%;
    justify-content: center;
  }

  .privacy-learned__clock {
    flex-wrap: wrap;
  }

  /* Dashboard */
  .member-page--dashboard {
    min-height: 0;
    padding-top: 0.25rem;
  }

  .dashboard-fluid {
    gap: 0.65rem;
    align-items: start;
  }

  .dashboard-hero-row,
  .dashboard-secure-row,
  .dashboard-tools-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.35rem 0;
  }

  .access-status-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem 0.75rem;
  }

  .panel-access .meta-item:has(.access-countdown) {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: start;
  }

  .panel-access .access-countdown {
    font-size: clamp(0.95rem, 4.5vw, 1.2rem);
  }

  /* Payment: title / status / input / buttons */
  .member-page--dashboard .payment-strip {
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .member-page--dashboard .payment-strip__empty {
    white-space: normal;
  }

  .member-page--dashboard .payment-strip__enter {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    justify-self: stretch;
  }

  .member-page--dashboard .payment-strip__input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .member-page--dashboard .payment-strip__enter .btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  /* Security: quota then actions (stack, no side void) */
  .security-toolbar {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    align-items: stretch;
  }

  .security-toolbar .panel-id-quota {
    order: -1;
    align-items: center;
    text-align: center;
    max-width: none;
    width: 100%;
    padding: 0 0 0.55rem;
    border-inline-start: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .member-page .metric-grid--id-quota {
    justify-items: center;
  }

  .member-page .metric-grid--id-quota .metric-card {
    align-items: center;
  }

  .member-page .metric-grid--id-quota .metric-value {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .member-page .metric-grid--id-quota .metric-label,
  .panel-id-quota__hint {
    text-align: start;
    max-width: none;
  }

  .panel-id-quota .btn {
    width: auto;
    min-width: 0;
    align-self: flex-start;
  }

  .panel-security .security-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .panel-security .security-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  .security-phrase__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .security-phrase__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  .member-page--dashboard .access-config-field {
    flex-direction: column;
    align-items: stretch;
  }

  .member-page--dashboard .access-config-field .btn {
    margin-inline-start: 0;
    width: 100%;
    justify-content: center;
  }

  .dashboard-foot-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-top: 0.65rem;
  }

  /* Footer: brand row + compact 2-col links (same compact voice as desktop) */
  .site-footer .footer-inner {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
  }

  .footer-about-stack,
  .footer-brand,
  .footer-brand--meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.55rem;
    max-width: none;
  }

  .footer-meta {
    white-space: normal;
  }

  /* §1e / §4c: even 2-col grid — not crooked flex-wrap 2+2+1 */
  .site-footer .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 0.5rem;
    width: 100%;
    margin-inline-start: 0;
    justify-content: stretch;
    align-items: stretch;
    justify-items: start;
    flex-wrap: wrap;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .site-footer .footer-links a {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    justify-content: flex-start;
    padding: 0.4rem 0.35rem !important;
    white-space: normal;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .footer-about-stack {
    min-width: 0;
    max-width: none;
  }
}
