:root {
  color-scheme: light;
  --flow-theme-preference: system;
  --flow-theme-resolved: light;

  --flow-bg-app: #f3f4f6;
  --flow-bg-panel: #e5e9ef;
  --flow-bg-card: #ffffff;
  --flow-bg-subtle: #eceff3;
  --flow-bg-elevated: #fafbfc;

  --flow-text-primary: #1f2937;
  --flow-text-secondary: #374151;
  --flow-text-muted: #64748b;
  --flow-text-label: #334155;
  --flow-text-on-accent: #ffffff;

  --flow-border-soft: #e5e7eb;
  --flow-border-default: #d1d5db;
  --flow-border-strong: #b8c0cc;

  --flow-accent: #2f6e94;
  --flow-accent-soft: #dceaf3;
  --flow-accent-top: #4fb9e8;
  --flow-accent-deep: #24556f;

  --flow-chip-bg: #ddeaf5;
  --flow-chip-border: #a8c4da;
  --flow-chip-text: #234a63;

  --flow-match-strong-bg: #e6f3ea;
  --flow-match-strong-border: #9fc8ae;
  --flow-match-strong-text: #2f6b46;
  --flow-match-viable-bg: #e5eefb;
  --flow-match-viable-border: #9fb7e4;
  --flow-match-viable-text: #2b5ea8;
  --flow-match-conditional-bg: #f8efd8;
  --flow-match-conditional-border: #d8c186;
  --flow-match-conditional-text: #8a6a14;
  --flow-match-low-bg: #f8e3e3;
  --flow-match-low-border: #d6a5a5;
  --flow-match-low-text: #8c3a3a;

  --flow-focus: #7cc6ea;
  --flow-shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 16px rgba(16, 24, 40, 0.05);
  --flow-shadow-hover: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 18px rgba(16, 24, 40, 0.06);
  --flow-shadow-elevated: 0 12px 28px rgba(16, 24, 40, 0.08);
  --flow-shadow-strong: 0 18px 36px rgba(16, 24, 40, 0.12);
  --flow-interactive-hover-shadow: var(--flow-shadow-hover);
  --flow-interactive-focus-ring: color-mix(in srgb, var(--flow-accent) 16%, transparent);
  --flow-interactive-active-ring: color-mix(in srgb, var(--flow-accent) 22%, transparent);
  --flow-interactive-hover-border: color-mix(in srgb, var(--flow-accent) 18%, var(--flow-border-default));
  --flow-interactive-focus-border: color-mix(in srgb, var(--flow-accent) 34%, var(--flow-border-default));
  --flow-modal-active-border: color-mix(in srgb, var(--flow-accent) 36%, var(--flow-border-default));
  --flow-modal-active-glow: color-mix(in srgb, var(--flow-accent) 14%, transparent);
  --flow-modal-active-bg: color-mix(in srgb, var(--flow-bg-card) 96%, var(--flow-accent-soft));
  --flow-modal-backdrop: rgba(237, 242, 247, 0.62);

  --flow-font-body: Tahoma, Verdana, "Segoe UI", sans-serif;
  --flow-font-display: Tahoma, Verdana, "Segoe UI", sans-serif;

  --flow-bg: var(--flow-bg-app);
  --flow-bg-alt: var(--flow-bg-panel);
  --flow-surface: var(--flow-bg-card);
  --flow-surface-strong: var(--flow-bg-elevated);
  --flow-surface-soft: var(--flow-bg-subtle);
  --flow-ink: var(--flow-text-primary);
  --flow-muted: var(--flow-text-muted);
  --flow-line: var(--flow-border-default);
  --flow-success: var(--flow-match-strong-text);
  --flow-danger: var(--flow-match-low-text);

  --flow-shell: min(1120px, calc(100% - 32px));
  --flow-shell-wide: min(1160px, calc(100% - 32px));
  --flow-space-2: 8px;
  --flow-space-3: 12px;
  --flow-space-4: 16px;
  --flow-space-5: 20px;
  --flow-space-6: 24px;
  --flow-space-7: 28px;
  --flow-space-8: 32px;
  --flow-space-10: 40px;
  --flow-radius-sm: 10px;
  --flow-radius-md: 12px;
  --flow-radius-lg: 14px;
  --flow-radius-xl: 16px;
  --flow-radius-pill: 999px;
  --flow-motion-fast: 160ms;
  --flow-motion-base: 220ms;
  --flow-motion-slow: 320ms;
  --flow-ease: ease;
  --taloro-top: #000000;
  --taloro-mid: #0B1F3A;
  --taloro-bottom: #3ECBFF;
}

:root[data-theme-resolved="dark"] {
  color-scheme: dark;
  --flow-bg-app: #181614;
  --flow-bg-panel: #22201d;
  --flow-bg-card: #2d2926;
  --flow-bg-subtle: #262320;
  --flow-bg-elevated: #312c28;

  --flow-text-primary: #f3eee8;
  --flow-text-secondary: #ddd2c7;
  --flow-text-muted: #c8beb3;
  --flow-text-label: #c8beb3;

  --flow-border-soft: #585048;
  --flow-border-default: #6a6158;
  --flow-border-strong: #7a7167;

  --flow-accent: #6fa8c0;
  --flow-accent-soft: color-mix(in srgb, #6fa8c0 22%, transparent);
  --flow-accent-top: #4fb9e8;
  --flow-accent-deep: #8abbd0;

  --flow-chip-bg: #2a3941;
  --flow-chip-border: #466171;
  --flow-chip-text: #d9eef6;

  --flow-match-strong-bg: color-mix(in srgb, #7fb89a 18%, transparent);
  --flow-match-strong-border: color-mix(in srgb, #7fb89a 38%, transparent);
  --flow-match-strong-text: #7fb89a;
  --flow-match-viable-bg: color-mix(in srgb, #6d94d6 18%, transparent);
  --flow-match-viable-border: color-mix(in srgb, #6d94d6 38%, transparent);
  --flow-match-viable-text: #91b2ea;
  --flow-match-conditional-bg: color-mix(in srgb, #d7a84a 18%, transparent);
  --flow-match-conditional-border: color-mix(in srgb, #d7a84a 38%, transparent);
  --flow-match-conditional-text: #d7a84a;
  --flow-match-low-bg: color-mix(in srgb, #d27c72 18%, transparent);
  --flow-match-low-border: color-mix(in srgb, #d27c72 38%, transparent);
  --flow-match-low-text: #d27c72;

  --flow-focus: #7cc6ea;
  --flow-shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.34);
  --flow-shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.28);
  --flow-shadow-elevated: 0 18px 36px rgba(0, 0, 0, 0.36);
  --flow-shadow-strong: 0 22px 48px rgba(0, 0, 0, 0.42);
  --flow-interactive-hover-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  --flow-interactive-focus-ring: color-mix(in srgb, var(--flow-accent) 18%, transparent);
  --flow-interactive-active-ring: color-mix(in srgb, var(--flow-accent) 26%, transparent);
  --flow-interactive-hover-border: color-mix(in srgb, var(--flow-accent) 22%, var(--flow-border-default));
  --flow-interactive-focus-border: color-mix(in srgb, var(--flow-accent) 40%, var(--flow-border-default));
  --flow-modal-active-border: color-mix(in srgb, var(--flow-accent) 40%, var(--flow-border-default));
  --flow-modal-active-glow: color-mix(in srgb, var(--flow-accent) 16%, transparent);
  --flow-modal-active-bg: color-mix(in srgb, var(--flow-bg-card) 94%, var(--flow-accent-soft));
  --flow-modal-backdrop: rgba(12, 16, 24, 0.64);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  background: var(--flow-bg-app);
  color: var(--flow-text-primary);
  font-family: var(--flow-font-body);
  font-size: 13px;
  line-height: 1.5;
}
button,
input,
textarea,
select,
code,
pre {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
summary {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.button:focus-visible,
.button-primary:focus-visible,
.button-secondary:focus-visible,
.topbar-link:focus-visible,
.footer-link:focus-visible,
.cta-card:focus-visible,
.module-links a:focus-visible,
.mini-link-list a:focus-visible,
.stack-link:focus-visible,
.headline-list a:focus-visible {
  outline: 2px solid var(--flow-focus);
  outline-offset: 2px;
}
p {
  margin: 0;
  color: var(--flow-text-muted);
  line-height: 1.6;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--flow-font-display);
  letter-spacing: -0.02em;
  color: var(--flow-text-primary);
}
h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.05;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.1;
  font-weight: 800;
}
h3 {
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 800;
}

.page-shell,
.site-shell {
  width: var(--flow-shell);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-shell--wide { width: var(--flow-shell-wide); }
.site-header,
header.site-shell,
header.page-shell {
  padding: 28px 0 18px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--flow-space-4);
  margin-bottom: var(--flow-space-7);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--flow-space-3);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--flow-accent);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--flow-radius-pill);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--flow-bg-card);
  border: 1px solid var(--flow-border-default);
  box-shadow: var(--flow-shadow-soft);
}
.brand-mark[data-taloro-state="running"],
.brand-mark[data-taloro-state="activation"] {
  border-color: var(--flow-accent-top);
}
.brand-mark[data-taloro-state="blocked"] {
  border-color: var(--flow-match-low-border);
}
.brand-mark .taloro-mark__image,
.brand-mark .taloro-mark__sprite {
  position: relative;
  z-index: 1;
}
.eyebrow,
.panel-kicker,
.result-kicker,
.kicker,
.section-tag,
.tool-meta {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: var(--flow-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tool-meta {
  padding: 6px 10px;
  border-radius: var(--flow-radius-pill);
  border: 1px solid var(--flow-chip-border);
  background: var(--flow-chip-bg);
  color: var(--flow-chip-text);
  letter-spacing: 0.06em;
  font-weight: 700;
}
.section-header,
.module-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--flow-border-soft);
}
.section-header p,
.module-head p {
  max-width: 44ch;
  font-size: 0.96rem;
}
.section-header h2,
.module-head h2 { line-height: 1.05; }
.rail-module,
.portal-module,
.portal-band,
.mini-card,
.band-card,
.headline-card,
.spotlight-card,
.feature-card,
.tool-card,
.module-tool,
.card,
.hero-card,
.category-section,
.panel,
.result,
.detail-card,
.cta-card,
.note-block,
.trust-bar,
.trust-strip,
.footer-card,
.state-card,
.premium-surface,
.utility-panel,
.directory-panel {
  border: 1px solid var(--flow-border-default);
  border-radius: var(--flow-radius-lg);
  background: var(--flow-bg-card);
  box-shadow: var(--flow-shadow-soft);
}
.rail-module,
.portal-module,
.portal-band {
  padding: 16px 18px;
  box-shadow: none;
}
.featured-module,
.list-module {
  display: grid;
  gap: 14px;
}
.featured-module { min-height: 100%; }
.featured-module__body {
  display: grid;
  gap: 12px;
}
.featured-module__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--flow-text-muted);
  font-size: 0.92rem;
}
.featured-module__meta a {
  color: var(--flow-accent);
  font-weight: 700;
}
.module-links {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.module-links li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--flow-border-soft);
}
.module-links li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.module-links a {
  color: var(--flow-text-primary);
  font-weight: 800;
}
.module-links a:hover { color: var(--flow-accent); }
.module-links span {
  color: var(--flow-text-muted);
  font-size: 0.93rem;
  line-height: 1.45;
}
.module-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.module-tool {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--flow-border-default);
  border-radius: var(--flow-radius-lg);
  background: var(--flow-bg-card);
  box-shadow: none;
}
.module-tool p {
  font-size: 0.95rem;
  line-height: 1.5;
}
.module-tool .button-primary { margin-top: auto; }

.tool-header,
.hero {
  display: grid;
  gap: var(--flow-space-6);
  align-items: end;
  padding: var(--flow-space-7);
  border: 1px solid var(--flow-border-default);
  border-radius: var(--flow-radius-xl);
  background: var(--flow-bg-card);
  box-shadow: var(--flow-shadow-elevated);
}
.tool-header { grid-template-columns: minmax(0, 1fr) 280px; }
.hero { grid-template-columns: minmax(0, 1.2fr) 320px; }
.hero-copy p {
  margin-top: 14px;
  max-width: 64ch;
  font-size: 1.05rem;
}
.hero-card {
  padding: 18px 20px;
  border-color: var(--flow-border-soft);
  background: var(--flow-bg-elevated);
}
.hero-card strong,
.cta-card strong {
  display: block;
  font-size: 1.05rem;
}
.hero-points {
  display: grid;
  gap: var(--flow-space-2);
  margin: 0;
  padding-left: 18px;
  list-style: disc;
  color: var(--flow-text-muted);
  font-size: 0.96rem;
}
.hero-points li::marker { color: var(--flow-accent); }

.button,
.button-primary,
.button-secondary,
.topbar-link,
.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--flow-radius-pill);
  border: 1px solid var(--flow-border-default);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--flow-motion-fast) var(--flow-ease), border-color var(--flow-motion-fast) var(--flow-ease), color var(--flow-motion-fast) var(--flow-ease), transform var(--flow-motion-fast) var(--flow-ease), box-shadow var(--flow-motion-fast) var(--flow-ease);
}
.button:hover,
.button-primary:hover,
.button-secondary:hover,
.topbar-link:hover,
.footer-link:hover,
.cta-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--flow-interactive-hover-shadow);
  border-color: var(--flow-interactive-hover-border);
}
.button-primary,
.primary-cta {
  border-color: var(--flow-accent);
  background: var(--flow-accent);
  color: var(--flow-text-on-accent);
  box-shadow: var(--flow-shadow-soft);
}
.button-secondary,
.topbar-link,
.footer-link,
.secondary-cta {
  background: var(--flow-bg-elevated);
  color: var(--flow-text-secondary);
}
.primary-cta .panel-kicker,
.primary-cta p {
  color: var(--flow-text-on-accent);
}
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 232px;
  min-width: 0;
  gap: 12px;
  padding: 22px;
}
.tool-card > *,
.cta-card > *,
.module-tool > * { max-width: 100%; }
.tool-card p,
.cta-card p,
.module-tool p { margin-top: 0; }
.tool-card .button-primary,
.tool-card .button-secondary,
.cta-card .button-primary,
.cta-card .button-secondary,
.module-tool .button-primary,
.module-tool .button-secondary {
  margin-top: auto;
  align-self: flex-start;
}

.directory-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  margin-top: 22px;
}
.directory-grid > *,
.category-grid > *,
.slots > *,
.gated-grid > * { min-width: 0; }
.directory-panel,
.category-section { padding: 24px; }
.tool-list {
  display: grid;
  gap: 18px;
}
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 22px;
  background: var(--flow-border-soft);
}
.trust-item {
  padding: 22px;
  background: var(--flow-bg-card);
}
.trust-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--flow-accent);
  font-size: 1.25rem;
}
.calculator-layout,
.calculator-pattern {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 22px;
  align-items: start;
}
.panel,
.result,
.note-block,
.footer-card,
.premium-surface,
.utility-panel { padding: 24px; }
.panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-copy { max-width: 42ch; }
.input-panel,
.panel { background: var(--flow-bg-card); }
.result-panel,
.result {
  position: sticky;
  top: 18px;
  background: var(--flow-bg-card);
}
.result strong {
  display: block;
  margin-bottom: 16px;
  color: var(--flow-accent);
  font-size: clamp(2rem, 4vw, 2.95rem);
  line-height: 1;
}
.status-surface,
.taloro-state {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--flow-border-default);
  border-radius: var(--flow-radius-md);
  background: var(--flow-bg-elevated);
}
.taloro-state[data-taloro-state="activation"],
.taloro-state[data-taloro-state="running"] {
  border-color: var(--flow-match-viable-border);
  background: var(--flow-match-viable-bg);
}
.taloro-state[data-taloro-state="blocked"] {
  border-color: var(--flow-match-low-border);
  background: var(--flow-match-low-bg);
}
.taloro-state[data-taloro-state="complete"] {
  border-color: var(--flow-match-strong-border);
  background: var(--flow-match-strong-bg);
}
.taloro-state__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.taloro-state__label {
  color: var(--flow-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.taloro-state__title {
  color: var(--flow-text-primary);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}
.taloro-state__hint {
  color: var(--flow-text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}
.taloro-state[data-taloro-state="blocked"] .taloro-state__label,
.taloro-state[data-taloro-state="blocked"] .taloro-state__title {
  color: var(--flow-match-low-text);
}
.taloro-state[data-taloro-state="activation"] .taloro-state__label,
.taloro-state[data-taloro-state="activation"] .taloro-state__title,
.taloro-state[data-taloro-state="running"] .taloro-state__label,
.taloro-state[data-taloro-state="running"] .taloro-state__title {
  color: var(--flow-match-viable-text);
}
.taloro-state[data-taloro-state="complete"] .taloro-state__label,
.taloro-state[data-taloro-state="complete"] .taloro-state__title {
  color: var(--flow-match-strong-text);
}
form,
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label,
.field {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--flow-text-primary);
}
input,
select,
textarea,
.control {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--flow-border-default);
  border-radius: var(--flow-radius-sm);
  padding: 14px 16px;
  background: var(--flow-bg-card);
  color: var(--flow-text-primary);
  font: inherit;
}
input:focus,
select:focus,
textarea:focus,
.control:focus {
  outline: none;
  border-color: var(--flow-interactive-focus-border);
  box-shadow: 0 0 0 4px var(--flow-interactive-focus-ring);
}
dl {
  display: grid;
  gap: 10px;
  margin: 0;
}
dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--flow-radius-sm);
  background: var(--flow-bg-subtle);
}
dt { color: var(--flow-text-muted); }
dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}
.trust-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--flow-border-soft);
}
.trust-list li::before {
  content: "\2022";
  color: var(--flow-accent);
  margin-right: 10px;
}
.result-hint {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--flow-radius-md);
  background: var(--flow-match-strong-bg);
  color: var(--flow-match-strong-text);
  font-weight: 700;
}
.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 22px;
  overflow: hidden;
}
.detail-card {
  padding: 22px;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid var(--flow-border-default);
  box-shadow: none;
}
.detail-card:first-child { border-left: 0; }
.detail-card:last-child { border-right: 0; }
.detail-card p { margin-top: 8px; }
.slots,
.gated-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 22px;
}
.cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 100%;
  padding: 22px;
  text-decoration: none;
}
.note-block { margin-top: 22px; }
.note-block p + p { margin-top: 14px; }
.footer-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}
.utility-layout,
.info-layout {
  display: grid;
  gap: 22px;
}
.premium-surface {
  display: grid;
  gap: 16px;
  background: var(--flow-bg-panel);
  color: var(--flow-text-primary);
}
.premium-surface p,
.premium-surface .eyebrow,
.premium-surface .panel-kicker {
  color: var(--flow-text-muted);
}
.disclosure {
  margin-top: 18px;
  color: var(--flow-text-muted);
  font-size: 0.93rem;
  line-height: 1.5;
}
.ad-slot {
  margin: 18px 0;
  min-height: 68px;
  border: 1px dashed var(--flow-border-default);
  border-radius: var(--flow-radius-md);
  background: var(--flow-bg-elevated);
  color: var(--flow-text-muted);
  text-align: center;
  padding: 20px;
}
.ad-slot[hidden] { display: none; }
main.site-shell,
main.page-shell { padding-bottom: 48px; }

.section-header,
.module-head { border-bottom-color: var(--flow-border-soft); }
.portal-grid { gap: 14px; }
.portal-rail,
.portal-center { gap: 14px; }
.portal-module--feature,
.featured-module { padding: 18px; }
.portal-module--split { gap: 14px; }
.mini-link-list,
.stack-links,
.mini-card-list,
.headline-list { gap: 8px; }
.mini-link-list a,
.stack-link,
.headline-list a {
  gap: 4px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--flow-border-soft);
  border-radius: 0;
  background: transparent;
}
.mini-link-list li:last-child a,
.headline-list a:last-child,
.stack-links a:last-child { border-bottom: 0; }
.feature-grid,
.portal-directory,
.band-grid,
.headline-grid,
.module-tool-grid {
  gap: 12px;
}
.feature-grid,
.portal-directory,
.band-grid,
.headline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.module-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.tool-card { min-height: 0; }
.module-tool {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
}

@media (max-width: 980px) {
  .hero,
  .tool-header,
  .trust-strip,
  .directory-grid,
  .category-grid,
  .calculator-layout,
  .trust-bar,
  .slots,
  .gated-grid,
  .footer-card {
    grid-template-columns: 1fr;
  }
  .detail-card {
    border-right: 0;
    border-top: 1px solid var(--flow-border-default);
  }
  .detail-card:first-child { border-top: 0; }
  .result { position: static; }
}

@media (max-width: 720px) {
  .page-shell,
  .site-shell { width: min(100% - 20px, 1120px); }
  .site-header,
  header.site-shell,
  header.page-shell { padding-top: 18px; }
  .topbar,
  .panel-head,
  .section-head,
  .footer-card {
    flex-direction: column;
    align-items: stretch;
  }
  .hero,
  .tool-header,
  .panel,
  .result,
  .note-block,
  .footer-card,
  .category-section,
  .hero-card,
  .premium-surface,
  .utility-panel {
    padding: 20px;
    border-radius: var(--flow-radius-lg);
  }
  form,
  .field-grid { grid-template-columns: 1fr; }
}

