/* ──────────────────────────────────────────────────────────────────────────
   TSM.ORG — Radius Pack v1.0 (sitewide)
   Snapshot: v61_5_271 / 2026-05-28
   Doctrine: institutional-soft radii
     · 4px on CTAs, form fields, rectangular text boxes
     · 4px outer corners on internally-divided pill units (language toggle)
     · 8px outer corners on adjacent-block card grids (interior corners sharp,
       preserving hairline-gap institutional read)
   ────────────────────────────────────────────────────────────────────────── */

/* ─── 1. CTAs — 4px all corners ─────────────────────────────────────────── */
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-outline,
.btn-gold,
.btn-svg,
a.btn-primary, a.btn-secondary, a.btn-ghost, a.btn-outline, a.btn-gold,
button.btn-primary, button.btn-secondary, button.btn-ghost, button.btn-outline, button.btn-gold,
.cta, .cta-primary, .cta-secondary, .cta-ghost,
.hero-cta, .section-cta,
.nav-give, .nav-cta,
.give-btn, .donate-btn, .subscribe-btn, .submit-btn, .send-btn,
.gate-link, .gate-cta, .orientation-link, .route-end-link,
.pathway-anchor, .routing-link, .pathway-card-link, .pathway-proof-link,
.semi-cta-primary, .semi-cta-secondary, .semi-routing-link, .tsm-mob-btn, .header-cta,
.semi-layer-badge, .wf-badge, .wf-back,
.gate-btn, .gate-badge, .gate-tier,
.amt-tile, .give-btn, .give-closing-cta, .assurance-link,
.back-link,
.faq-home-cta, .faq-cta, .see-all-cta, .see-all-btn,
.newsletter-btn, .archive-btn, .visit-btn,
.header-marker, .engine-badge, .section-marker, .eyebrow-tag,
.editorial-badge, .pp-header-badge,
.tier-access, .tier-access-public, .tier-access-semi, .tier-access-private,
.essay-badge,
button[type="submit"],
input[type="submit"],
input[type="button"] {
  border-radius: 4px !important;
}

/* ─── 2. Form fields — 4px all corners ──────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
input[type="date"],
textarea,
select,
.gate-input, .gate-form input {
  border-radius: 4px !important;
}

/* ─── 3. Rectangular text boxes — 4px all corners ───────────────────────── */
.eyebrow,
.marker-text,
.principle-note,
.trust-pillar,
.gov-panel-note,
.fpi-note,
.pull-quote,
.pull-quote-card,
.s6-pull, .s8-proof-statement, .proof-statement, .thesis-bar, .thesis-statement,
.participation-boundary, .integration-pull,
/* .pathway-boundary moved to 8px container list per Santiago — partner FOCUS AREAS grey advisory cards */
.inquiry-boundary,
.p6-boundary, .av-boundary, .advisory-note, .disclosure-band, .bound-callout,
.profiles-suppression-note, .suppression-note,
.p3-boundary, .p4-gate, .governance-pull, .fiduciary-statement,
.routing-statement, .semi-routing-statement, .closing-statement,
[class*="-statement"], [class*="-boundary"], [class*="-disclosure"], [class*="-gate"], [class*="-pull"], [class*="-note"], [class*="-callout"],
.callout,
.callout-box,
.info-banner,
.tag-pill,
.badge,
.rev-pill,
.rev-pill.done,
.rev-pill.todo,
.note-box,
.philosophy-pillar,
.participation-pillar,
.engine-tag,
.engine-card-tag,
.engine-badge-num,
.engine-badge-label,
.engine-badge-line,
.engagement-pill,
.engagement-tag,
.pathway-option-accent,
.bound-callout,
.disclosure-band {
  border-radius: 4px !important;
}

/* ─── 4. Language pill (internally-divided unit) ───────────────────────────
       4px on the OUTER 4 corners only. Interior .nlb buttons stay sharp.
       overflow:hidden clips the active-button background to the rounded shape. */
.nav-lang,
.nav-lang-mob,
.nav-lang-mob-inner,
.lang-toggle,
.lang-pills {
  border-radius: 4px !important;
  overflow: hidden !important;
}
/* Defensive: ensure interior buttons in the pill stay square */
.nav-lang .nlb,
.nav-lang-mob .nlb,
.nav-lang-mob-inner .nlb,
.lang-toggle .nlb,
.lang-pills .nlb {
  border-radius: 0 !important;
}

/* ─── 5. Cards — 8px outer corners only when in adjacent-block grid ──────── */

/* 5a. Default fallback: standalone cards get 8px all corners.
       This handles any card that isn't inside a known hairline-gap container. */
.card,
.dimension-card,
.engine-card,
.path-card,
.pathway-card,
.route-card,
.subpage-card,
.gov-card,
.nav-card,
.v163-card,
.governance-item {
  border-radius: 8px !important;
}

/* 5b. Hairline-gap card grids — the container itself gets 8px + overflow:hidden,
       so only the 4 OUTER corners of the unified block are visible. Interior
       child corners are clipped naturally. This approach is layout-agnostic:
       works equally well for 1×4 horizontal, 2×2, or vertical-stack at mobile
       — the outer mask is always the container's bounding box, regardless of
       how children flow inside. Children inside have their fallback 8px
       overridden to 0 so the gap-area lines stay crisp. */
.s3-dimensions,
.paths-grid,
.dimensions-grid,
.dim-cards,
.dim-grid,
.engines-grid,
.engines-row,
.pathways-row,
.routes-row,
.gov-grid,
.governance-grid,
.s8-governance, .s7-grid, .gov-instruments,
.header-principles, .header-field-panel,
.hero-nav-cards, .hero-nav, .hero-cards,
.leadership-nav, .nav-cards-block,
.engine-routes, .integration-flow,
.engine-connections, .integration-connections,
.growth-principles, .participation-pillars,
.profiles-grid, .dev-status, .pathway-types,
.subpage-routes,
.support-columns, .continuity-mechanisms, .pathway-options,
.endowment-properties, .governance-elements, .fid-logic,
.header-governance-panel,
.orientation-principles, .material-tiers, .audience-groups,
.review-steps, .presentation-scope, .expect-list, .route-end-paths-list,
.role-structure, .founding-axioms, .gov-architecture,
.advisory-characteristics, .integrity-principles, .eval-pathways,
.faq-home-list, .qa-list, .philosophy-inner,
.reflections-grid, .publications-grid, .messages-grid,
.item-list, .pathways-grid, .exp-rules-list, .v174-grid,
.dark-grid, .dark-grid-sticky, .dark-item-list,
.phase-list, .legal-grid, .toc-list,
.works-grid, .model-dimensions, .reint-links,
.presentation-placeholder, .request-form, .form-card,
.three-col, .bounds-card, .pathway-boundary, .boundary,
.inquiry-form-container, .exp-rules,
.editorial-governance, .publications-note, .editorial-note,
.legal-notice, .ecosystem-notice, .page-notice,
.semi-right, .semi-panel,
.dark-cards, .dark-boundary,
.layer-stack, .access-status-panel, .conv-columns,
.program-phase-block,
.evaluator-profiles, .material-categories, .who-boundary,
.wf-hero-right, .wf-info, .engagement-level,
.engine-grid, .major-gift, .entity-block,
.v163-cards,
.header-capability-panel,
.access-models, .av-models, .av-network-depth,
.aircraft-photos, .photos-row, .two-photo-grid,
.gov-stack,
.cards-row,
.cards-stack,
.cards-block {
  border-radius: 8px !important;
  overflow: hidden !important;
}
.s3-dimensions > *,
.paths-grid > *,
.dimensions-grid > *,
.dim-cards > *,
.dim-grid > *,
.engines-grid > *,
.engines-row > *,
.pathways-row > *,
.routes-row > *,
.gov-grid > *,
.governance-grid > *,
.s8-governance > *, .s7-grid > *, .gov-instruments > *,
.header-principles > *, .header-field-panel > *,
.hero-nav-cards > *, .hero-nav > *, .hero-cards > *,
.leadership-nav > *, .nav-cards-block > *,
.engine-routes > *, .integration-flow > *,
.engine-connections > *, .integration-connections > *,
.growth-principles > *, .participation-pillars > *,
.profiles-grid > *, .dev-status > *, .pathway-types > *,
.subpage-routes > *,
.support-columns > *, .continuity-mechanisms > *, .pathway-options > *,
.endowment-properties > *, .governance-elements > *, .fid-logic > *,
.header-governance-panel > *,
.orientation-principles > *, .material-tiers > *, .audience-groups > *,
.review-steps > *, .presentation-scope > *, .expect-list > *, .route-end-paths-list > *,
.role-structure > *, .founding-axioms > *, .gov-architecture > *,
.advisory-characteristics > *, .integrity-principles > *, .eval-pathways > *,
.faq-home-list > *, .qa-list > *, .philosophy-inner > *,
.reflections-grid > *, .publications-grid > *, .messages-grid > *,
.item-list > *, .pathways-grid > *, .exp-rules-list > *, .v174-grid > *,
.dark-grid > *, .dark-grid-sticky > *, .dark-item-list > *,
.phase-list > *, .legal-grid > *, .toc-list > *,
.works-grid > *, .model-dimensions > *, .reint-links > *,
.presentation-placeholder > *, .presentation-placeholder video,
.request-form > *,
.three-col > *,
.inquiry-form-container > *, .exp-rules > *,
.semi-right > *, .semi-panel > *,
.dark-cards > *,
.layer-stack > *, .access-status-panel > *, .conv-columns > *,
.evaluator-profiles > *, .material-categories > *,
.wf-hero-right > *,
.engine-grid > *,
.v163-cards > *,
.header-capability-panel > *, .header-capability-panel img,
.access-models > *, .av-models > *, .av-network-depth > *,
.aircraft-photos > *, .aircraft-photos img,
.photos-row > *, .photos-row img,
.two-photo-grid > *, .two-photo-grid img,
.gov-stack > *,
.cards-row > *,
.cards-stack > *,
.cards-block > * {
  border-radius: 0 !important;
}

/* ─── 6. Images — 8px all corners (content photos treated as cards) ──────── */
img,
picture,
video {
  border-radius: 8px !important;
}

/* 6a. Exclusions — icons, seals, logos, hero fullbleeds, SVGs stay sharp.
       The TSM seal/roundel is already 50% circular elsewhere; don't override
       to 8px. The cathedral hero is fullbleed; rounding its corners would
       create awkward gaps at the viewport edges. */
.nav-logo img, .nav-logo picture, .nav-logo svg,
.footer-brand img, .footer-brand picture, .footer-brand svg,
.icon, .icon img, .icon picture, .icon svg,
.icon-img, img.icon, picture.icon,
img[src*="roundel"], img[src*="-icon"], img[src*="-seal"], img[src*="logo"],
img[src*="favicon"],
.hero > img, .hero > picture, .hero > video,
.hero img.hero-cathedral-poster,
.hero video.hero-cathedral,
.hero-bg, .hero-bg img, .hero-bg video,
.seal, img.seal, picture.seal,
.roundel, img.roundel, picture.roundel,
svg {
  border-radius: 0 !important;
}

/* 6b. Images inside adjacent-block grid containers (section 5b) inherit
       overflow:hidden masking from the parent, so their own corners are
       already clipped — no extra rule needed. */

/* 6c. Photo-frame wrappers — if a photo wrapper has its own border/shadow,
       the wrapper itself must also be 8px so the frame matches the image's
       rounded corners. Without this, the image curves in but the border
       stays square, leaving visible square slivers at the corners. */
.engine-photo,
.photo-frame,
.photo-wrapper,
.story-photo,
.story-image,
.feature-image,
.reflection-photo,
.message-photo,
.partner-photo {
  border-radius: 8px !important;
  overflow: hidden !important;
}
