/* Local O! Talks multi-page visual bridge.
   Scoped to authenticated, sign-in, profile, and connection surfaces. */
:where(.login-page, .app-bg) {
  --ot-petrol: #163d42;
  --ot-petrol-2: #0f555c;
  --ot-orange: #f05a3d;
  --ot-cobalt: #1d56e8;
  --ot-citrus: #ddef47;
  --ot-canvas: #fbfcfa;
  --ot-paper: #f7f7f2;
  --ot-muted: #5d6c6e;
  --ot-line: rgba(22, 61, 66, .14);
  --ink: var(--ot-petrol);
  --muted: var(--ot-muted);
  --line: var(--ot-line);
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 8%, rgba(240,90,61,.045), transparent 25%),
    radial-gradient(circle at 6% 42%, rgba(29,86,232,.035), transparent 24%),
    var(--ot-canvas);
  color: var(--ot-petrol);
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

:where(.login-page, .app-bg) h1,
:where(.login-page, .app-bg) h2,
:where(.login-page, .app-bg) h3,
:where(.login-page, .app-bg) .button,
:where(.login-page, .app-bg) .eyebrow,
:where(.login-page, .app-bg) .source-pill {
  font-family: "Segoe UI Variable Display", Inter, "Segoe UI", sans-serif;
}

.ot-app-header {
  position: relative;
  z-index: 20;
  background: var(--ot-petrol, #163d42);
  box-shadow: 0 12px 34px rgba(22,61,66,.12);
}

.ot-app-header .nav,
.ot-app-header .app-nav {
  width: min(1200px, calc(100% - 48px));
  min-height: 88px;
  height: auto;
  margin-inline: auto;
  border: 0;
}

.ot-shell-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}

.ot-shell-brand-crop {
  position: relative;
  display: block;
  width: 184px;
  height: 58px;
  overflow: hidden;
  border-radius: 8px;
  background: #f1ecdf;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}

.ot-shell-brand-crop img {
  position: absolute;
  left: -44px;
  top: -110px;
  width: 308px;
  height: auto;
  max-width: none;
}

.ot-app-header .text-link { color: rgba(255,255,255,.82); }
.ot-app-header .text-link { font-size: 14px; text-decoration-color: rgba(255,255,255,.38); }
.ot-app-header .button.soft { border-color: rgba(255,255,255,.36); background: transparent; color: #fff; }
.ot-app-header .button.soft:hover { background: rgba(255,255,255,.08); }
.ot-app-header .user-tools { display: flex; align-items: center; gap: 26px; }
.ot-app-header .user-tools > :where(a, button, .header-user-identity, .header-actions) { flex: 0 0 auto; margin: 0; }
.ot-app-header .header-actions { display: flex; align-items: center; gap: 10px; }
.ot-app-header .header-refresh { gap: 7px; }
.ot-app-header .header-refresh > span:first-child { font-size: 18px; line-height: 1; }
.ot-app-header .header-refresh[aria-busy="true"] { opacity: .72; }

:where(.login-page, .app-bg) .button {
  min-height: 46px;
  border-radius: 11px;
  padding: 12px 19px;
  font-size: 14px;
  font-weight: 760;
}

:where(.login-page, .app-bg) .button.primary {
  border-color: var(--ot-citrus);
  background: var(--ot-citrus);
  color: #102c31;
  box-shadow: 0 10px 25px rgba(139,160,12,.16);
}

:where(.login-page, .app-bg) .button.primary:hover { background: #e7f85d; }
:where(.login-page, .app-bg) .button.soft { border: 1px solid var(--ot-line); background: #fff; color: var(--ot-petrol); }
:where(.login-page, .app-bg) .text-button { color: var(--ot-cobalt); font-size: 13px; }

/* Sign in */
.login-page .center-page { min-height: calc(100vh - 88px); padding: 58px 0 80px; }
.login-page .auth-layout {
  width: min(1080px, 100%);
  min-height: 620px;
  grid-template-columns: .92fr 1.08fr;
  overflow: hidden;
  border: 1px solid var(--ot-line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(22,61,66,.09);
}
.login-page .auth-art {
  position: relative;
  padding: 52px;
  background: linear-gradient(150deg, #f6faf7, #fff 52%, #fff7f3);
  border-right: 1px solid var(--ot-line);
}
.login-page .auth-art::before {
  content: "";
  position: absolute;
  right: -76px;
  top: -76px;
  width: 230px;
  height: 230px;
  border: 36px solid rgba(240,90,61,.055);
  border-radius: 50%;
}
.login-page .auth-art::after { border-color: rgba(29,86,232,.035); }
.login-page .quote .eyebrow { color: var(--ot-petrol-2); font-size: 12px; letter-spacing: .14em; }
.login-page .quote .eyebrow i { background: var(--ot-orange); }
.login-page .quote strong { margin-top: 22px; color: var(--ot-petrol); font-size: clamp(42px, 4vw, 58px); line-height: 1.02; letter-spacing: -.05em; }
.login-page .quote p { max-width: 430px; color: var(--ot-muted); font-size: 17px; line-height: 1.7; }
.login-page .mini-thread { border: 1px solid var(--ot-line); border-left: 5px solid var(--ot-orange); border-radius: 16px; background: #fff; box-shadow: 0 18px 46px rgba(22,61,66,.07); }
.login-page .mini-thread small { color: var(--ot-petrol-2); font-size: 11px; letter-spacing: .12em; }
.login-page .mini-thread p { color: var(--ot-muted); font-size: 14px; line-height: 1.65; }
.login-page .auth-card { padding: 62px 56px; }
.login-page .auth-card .back { color: var(--ot-cobalt); font-size: 13px; }
.login-page .auth-card h1 { color: var(--ot-petrol); font-size: clamp(38px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -.05em; }
.login-page .auth-card > p { color: var(--ot-muted); font-size: 16px; line-height: 1.72; }
.login-page .login-context-note { border-left: 3px solid var(--ot-cobalt); border-radius: 0 12px 12px 0; background: #f5f8ff; color: var(--ot-muted); font-size: 14px; }
.login-page .secure-note { border: 1px solid var(--ot-line); background: var(--ot-paper); color: var(--ot-muted); font-size: 13px; }
.login-page .state-preview button { border-color: var(--ot-line); color: var(--ot-muted); }

/* Shared authenticated shell */
.app-bg .dashboard,
.app-bg .profile-shell,
.app-bg .center-page { width: min(1200px, calc(100% - 48px)); }
.app-bg .dashboard { padding: 62px 0 96px; }
.app-bg .welcome { margin-bottom: 34px; }
.app-bg .welcome .eyebrow { color: var(--ot-petrol-2); font-size: 12px; letter-spacing: .14em; }
.app-bg .welcome .eyebrow i { background: var(--ot-orange); }
.app-bg .welcome h1 { color: var(--ot-petrol); font-size: clamp(46px, 5vw, 66px); letter-spacing: -.055em; }
.app-bg .welcome p { color: var(--ot-muted); font-size: 17px; }
.app-bg .workspace-tag { border-color: var(--ot-line); background: #fff; color: var(--ot-petrol); font-size: 13px; }
.app-bg .workspace-nav { gap: 5px; padding: 8px; border-color: var(--ot-line); border-radius: 18px; box-shadow: 0 12px 32px rgba(22,61,66,.045); }
.app-bg .workspace-nav button { min-height: 44px; padding: 11px 16px; color: var(--ot-muted); font-size: 13px; }
.app-bg .workspace-nav button.active { background: var(--ot-petrol); color: #fff; }
.app-bg .panel,
.app-bg .placeholder-area,
.app-bg .profile-main,
.app-bg .profile-progress,
.app-bg .gateway {
  border-color: var(--ot-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22,61,66,.055);
}
.app-bg .panel { padding: 30px; }
.app-bg .workspace-settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 22px 0 8px;
}
.app-bg .workspace-settings-actions > .button { margin: 0; }
.app-bg .settings-profile-page { width: min(1200px, calc(100% - 48px)); padding: 62px 0 96px; }
.app-bg .settings-profile-page > .settings-personal-stack { display: grid; gap: 24px; }
.app-bg .settings-profile-back { justify-self: start; }
.app-bg .settings-profile-navigation-error { margin: 0; }
.app-bg .settings-profile-editor { width: 100%; padding: 0 0 24px; }
.app-bg .settings-profile-page .profile-shell { width: 100%; padding: 0 0 24px; }
.app-bg .settings-scope-root { display: grid; gap: 24px; }
.app-bg .settings-hub-heading { padding: 30px 34px; background: linear-gradient(120deg, #f8f4ff 0%, #fffaf4 52%, #eef9f5 100%); }
.app-bg .settings-hub-heading h2 { margin: 12px 0 6px; color: var(--ot-petrol); font-size: clamp(32px, 4vw, 46px); letter-spacing: -.045em; }
.app-bg .settings-hub-heading p { max-width: 680px; margin: 0; }
.app-bg .settings-scope-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.app-bg .settings-scope-navigation[hidden] { display: none; }
.app-bg .settings-scope-navigation button { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; min-width: 0; min-height: 108px; padding: 22px 24px; border: 2px solid var(--ot-petrol); border-radius: 20px; background: #fff; color: var(--ot-petrol); text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.app-bg .settings-scope-navigation button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22,61,66,.1); }
.app-bg .settings-scope-navigation button:focus-visible { outline: 4px solid rgba(42,89,255,.28); outline-offset: 3px; }
.app-bg .settings-scope-navigation button[aria-selected="true"] { background: var(--ot-petrol); color: #fff; box-shadow: 7px 7px 0 var(--ot-orange); }
.app-bg .settings-scope-navigation button > span { display: grid; gap: 8px; min-width: 0; }
.app-bg .settings-scope-navigation strong { font-size: 19px; line-height: 1.2; }
.app-bg .settings-scope-navigation small { max-width: 390px; color: var(--ot-muted); font-size: 13px; line-height: 1.5; }
.app-bg .settings-scope-navigation button[aria-selected="true"] small { color: rgba(255,255,255,.78); }
.app-bg .settings-scope-navigation em { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--ot-citrus); color: var(--ot-petrol); font-size: 10px; font-style: normal; font-weight: 850; letter-spacing: .08em; }
.app-bg .settings-scope-panel { display: grid; gap: 28px; min-width: 0; }
.app-bg .settings-scope-panel[hidden] { display: none; }
.app-bg .settings-overview-card h2 { margin: 12px 0 6px; color: var(--ot-petrol); font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.app-bg .settings-personal-stack #auto-publishing-settings { margin: 0; }
.app-bg .settings-personal-stack > #operator-access-settings { margin-bottom: 28px; }
.app-bg .settings-personal-stack > #operator-access-settings[hidden] + #auto-publishing-settings { margin-top: 28px; }
.app-bg .operator-access-settings { display: grid; gap: 24px; padding: clamp(24px,4vw,36px); }
.app-bg .operator-access-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.app-bg .operator-access-heading h2 { margin: 12px 0 6px; color: var(--ot-petrol); font-size: clamp(28px,3vw,38px); letter-spacing: -.035em; }
.app-bg .operator-access-heading p { max-width: 650px; margin: 0; }
.app-bg .operator-access-state { flex: 0 0 auto; padding: 9px 13px; border-radius: 999px; background: #f1edf5; color: #6f657a; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.app-bg .operator-access-state.is-active { background: #dff6e9; color: #18724f; }
.app-bg .operator-access-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--ot-line); border-radius: 18px; overflow: hidden; }
.app-bg .operator-access-facts>div { display: grid; gap: 6px; padding: 18px 20px; background: #fbfafc; }
.app-bg .operator-access-facts>div+div { border-left: 1px solid var(--ot-line); }
.app-bg .operator-access-facts span { color: var(--ot-muted); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.app-bg .operator-access-facts a,.app-bg .operator-access-facts strong { color: var(--ot-petrol); font-size: 16px; overflow-wrap: anywhere; }
.app-bg .operator-access-settings form { display: grid; gap: 14px; }
.app-bg .operator-access-settings form>label { display: grid; gap: 4px; color: var(--ot-petrol); font-size: 16px; font-weight: 850; }
.app-bg .operator-access-settings form label small,.app-bg #operator-passcode-help { color: var(--ot-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
.app-bg .operator-passcode-control { position: relative; max-width: 440px; }
.app-bg .operator-passcode-control input { width: 100%; min-height: 58px; padding: 0 82px 0 16px; border: 2px solid var(--ot-line); border-radius: 15px; color: var(--ot-petrol); font: 750 18px inherit; letter-spacing: .12em; }
.app-bg .operator-passcode-control input:focus { border-color: var(--ot-cobalt); outline: 4px solid rgba(42,89,255,.14); }
.app-bg .operator-passcode-control button { position: absolute; top: 8px; right: 9px; height: 42px; }
.app-bg #operator-passcode-help { max-width: 620px; margin: -3px 0 3px; }
.app-bg .operator-access-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.app-bg .operator-access-feedback { min-height: 22px; margin: 0; color: var(--ot-petrol); font-weight: 750; }
.app-bg .settings-platform-stack > div { min-width: 0; }
.app-bg .settings-platform-stack .platform-administration { margin: 0; }
.app-bg .source-pill { background: #edf5f3; color: var(--ot-petrol-2); font-size: 11px; letter-spacing: .09em; }
.app-bg .connection-badge { font-size: 11px; }
.app-bg .connection-badge.connected { background: rgba(221,239,71,.38); color: var(--ot-petrol); }
.app-bg .connection-badge.not-connected { background: #f5f8ff; color: var(--ot-cobalt); }
.app-bg .connection-badge.error,
.app-bg .connection-badge.reconnect-required { background: #fff0ed; color: #a44234; }
.app-bg .main-profile-identity h2 { color: var(--ot-petrol); font-size: 34px; }
.app-bg .main-profile-bio,
.app-bg .profile-next-step p,
.app-bg .workspace-setup > p,
.app-bg .setup-item small,
.app-bg .panel p { color: var(--ot-muted); font-size: 14px; line-height: 1.7; }
.app-bg .setup-item strong { color: var(--ot-petrol); font-size: 14px; }
.app-bg .setup-light { background: #f5f8ff; color: var(--ot-cobalt); }
.app-bg .setup-item.ready .setup-light { background: rgba(221,239,71,.42); color: var(--ot-petrol); }
.app-bg .profile-next-step { border-color: var(--ot-line); background: var(--ot-paper); }
.app-bg .next-step-art { color: var(--ot-orange); }
.app-bg .threads-home-wrap .content-hero { background: var(--ot-petrol); }
.app-bg .content-eyebrow { color: var(--ot-citrus); }

/* Profile */
.app-bg .profile-shell { padding: 38px 0 86px; }
.app-bg .profile-top { color: var(--ot-muted); font-size: 12px; }
.app-bg .profile-progress { border: 1px solid var(--ot-line); }
.app-bg .profile-progress h2 { color: var(--ot-petrol); font-size: 40px; letter-spacing: -.045em; }
.app-bg .profile-progress li { color: var(--ot-muted); font-size: 14px; }
.app-bg .profile-progress li.current { background: var(--ot-petrol); color: #fff; }
.app-bg .profile-progress li.done span { background: var(--ot-citrus); border-color: var(--ot-citrus); color: var(--ot-petrol); }
.app-bg .profile-main { border: 1px solid var(--ot-line); }
.app-bg .profile-step-label { color: var(--ot-orange); font-size: 12px; letter-spacing: .12em; }
.app-bg .profile-main h1 { color: var(--ot-petrol); font-size: 42px; letter-spacing: -.045em; }
.app-bg .profile-description { color: var(--ot-muted); font-size: 16px; }
.app-bg .profile-field > span,
.app-bg .profile-field > label,
.app-bg .profile-field legend { color: var(--ot-petrol); font-size: 15px; }
.app-bg .profile-field textarea,
.app-bg .profile-selector > input { border-color: var(--ot-line); background: #fff; font-size: 15px; }
.app-bg .profile-suggestions button { border-color: var(--ot-line); background: #f7faf8; color: var(--ot-petrol); font-size: 14px; }
.app-bg .profile-suggestions button[aria-pressed=true] { border-color: var(--ot-cobalt); background: #eef3ff; color: var(--ot-cobalt); }
.app-bg .profile-save-note { background: var(--ot-paper); color: var(--ot-muted); }

.app-bg .author-setup { width: min(1100px, calc(100% - 48px)); padding: 60px 0 90px; }
.app-bg .author-setup > header { max-width: 820px; margin-bottom: 34px; }
.app-bg .author-setup > header h1 { margin: 16px 0 12px; color: var(--ot-petrol); font-size: clamp(44px, 5vw, 64px); line-height: 1.02; letter-spacing: -.055em; }
.app-bg .author-setup > header > p { color: var(--ot-muted); font-size: 17px; }
.app-bg .author-language-guide { border: 1px solid var(--ot-line); border-left: 4px solid var(--ot-orange); background: #fff; color: var(--ot-muted); }
.app-bg .author-card { border-color: var(--ot-line); border-radius: 20px; }
.app-bg .author-card > summary { color: var(--ot-petrol); font-size: 17px; }
.app-bg .author-card > summary > span { background: var(--ot-petrol); color: var(--ot-citrus); }
.app-bg .author-card-body { color: var(--ot-muted); }
.app-bg .author-card textarea,
.app-bg .author-card input { border-color: var(--ot-line); background: #fff; }
.app-bg .author-chips label { border-color: var(--ot-line); background: #f8faf9; color: var(--ot-petrol); }
.app-bg .author-chips label:has(input:checked) { border-color: var(--ot-cobalt); background: #eef3ff; color: var(--ot-cobalt); }
.app-bg > .site-footer { border-color: rgba(255,255,255,.12); background: var(--ot-petrol); color: rgba(255,255,255,.76); }
.app-bg > .site-footer .footer-inner :where(a, strong, p, small) { color: rgba(255,255,255,.76); }
.app-bg > .site-footer .footer-tagline { color: #fff; }
.app-bg > .site-footer .footer-tagline span { color: var(--ot-citrus); }
.app-bg > .site-footer .footer-project a { color: #fff; }
.app-bg > .site-footer .ot-shell-brand { width: 174px; }
.app-bg > .site-footer .ot-shell-brand-crop { width: 174px; height: 54px; }
.app-bg > .site-footer .ot-shell-brand-crop img { left: -42px; top: -104px; width: 294px; }

.app-bg .back-top-button { border-color: var(--ot-petrol) !important; background: var(--ot-petrol) !important; font-family: Inter, "Segoe UI", sans-serif !important; }
.app-bg .back-top-button:hover { border-color: var(--ot-cobalt) !important; background: var(--ot-cobalt) !important; }
.ot-app-header .button.soft { border-color: rgba(255,255,255,.36); background: transparent; color: #fff; }

/* Connection */
.app-bg .center-page { min-height: calc(100vh - 88px); padding: 58px 0 82px; }
.app-bg .gateway { width: min(820px, 100%); padding: 52px; }
.app-bg .gateway-logo { border-radius: 16px; background: var(--ot-petrol); color: var(--ot-citrus); }
.app-bg .gateway h1 { color: var(--ot-petrol); font-size: clamp(42px, 5vw, 60px); letter-spacing: -.055em; }
.app-bg .gateway > p { color: var(--ot-muted); font-size: 16px; line-height: 1.72; }
.app-bg .step { border: 1px solid rgba(22,61,66,.08); border-radius: 14px; background: #fbfcfa; }
.app-bg .step span { border-radius: 9px; background: #eef3ff; color: var(--ot-cobalt); }
.app-bg .step b { color: var(--ot-petrol); font-size: 15px; }
.app-bg .step p { color: var(--ot-muted); font-size: 13px; }
.app-bg .privacy { color: var(--ot-muted); font-size: 12px; }

/* Brand-side Affiliate access */
.app-bg .brand-affiliate { color: var(--ot-petrol); }
.app-bg .brand-affiliate-workspace { overflow: hidden; border: 1px solid var(--ot-line); border-radius: 26px; background: #fff; box-shadow: 9px 10px 0 var(--ot-cobalt); }
.app-bg .brand-affiliate-hero,
.app-bg .brand-affiliate-form,
.app-bg .brand-affiliate-success { border: 1px solid var(--ot-line); border-radius: 24px; background: #fff; box-shadow: 8px 9px 0 var(--ot-cobalt); }
.app-bg .brand-affiliate-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 38px; padding: 42px 44px 32px; border: 0; border-radius: 0; background: #eef3ff; box-shadow: none; }
.app-bg .brand-affiliate-kicker { display: block; margin-bottom: 14px; color: var(--ot-cobalt); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.app-bg .brand-affiliate h1 { margin: 0; color: var(--ot-petrol); font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.055em; }
.app-bg .brand-affiliate-hero > div > p { max-width: 680px; margin: 22px 0 0; color: var(--ot-muted); font-size: 17px; line-height: 1.65; }
.app-bg .brand-affiliate-refresh { flex: 0 0 auto; margin-top: 4px; }
.app-bg .brand-affiliate-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; }
.app-bg .brand-affiliate-flow span { min-height: 94px; padding: 18px; border: 1px solid rgba(22,61,66,.18); border-radius: 16px; background: rgba(255,255,255,.82); font-size: 13px; font-weight: 750; line-height: 1.35; }
.app-bg .brand-affiliate-flow b { display: block; margin-bottom: 9px; color: var(--ot-cobalt); font-size: 11px; letter-spacing: .1em; }
.app-bg .brand-affiliate-flow i { color: var(--ot-cobalt); font-style: normal; }
.app-bg .brand-affiliate-form { padding: 36px 38px; border: 0; border-radius: 0; box-shadow: none; }
.app-bg .brand-affiliate-form-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.app-bg .brand-affiliate-form-heading h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; }
.app-bg .brand-affiliate-form-heading p { margin: 9px 0 0; color: var(--ot-muted); font-size: 15px; }
.app-bg .brand-affiliate-limit { flex: 0 0 auto; padding: 9px 13px; border-radius: 999px; background: var(--ot-petrol); color: #fff; font-size: 12px; font-weight: 800; }
.app-bg .brand-affiliate-error { margin-bottom: 22px; }
.app-bg .brand-affiliate-rows { display: grid; gap: 16px; }
.app-bg .brand-affiliate-row { position: relative; margin: 0; padding: 24px; border: 1px solid var(--ot-line); border-radius: 18px; background: #fbfcfa; }
.app-bg .brand-affiliate-row legend { display: flex; align-items: center; gap: 11px; padding: 0 7px; color: var(--ot-petrol); font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.app-bg .brand-affiliate-row legend span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--ot-cobalt); color: #fff; font-size: 11px; }
.app-bg .brand-affiliate-fields { display: grid; grid-template-columns: 1.05fr 1fr .9fr; gap: 16px; }
.app-bg .brand-affiliate-fields label { display: grid; align-content: start; gap: 8px; color: var(--ot-petrol); font-size: 13px; font-weight: 750; }
.app-bg .brand-affiliate-fields input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid rgba(22,61,66,.28); border-radius: 12px; background: #fff; color: var(--ot-petrol); font: inherit; font-size: 15px; font-weight: 500; }
.app-bg .brand-affiliate-fields input:focus { outline: 3px solid rgba(47,91,234,.16); border-color: var(--ot-cobalt); }
.app-bg .brand-affiliate-fields input[aria-invalid="true"] { border-color: #c43c31; background: #fff7f5; }
.app-bg .brand-affiliate-fields .field-error { color: #a63229; font-size: 12px; font-weight: 700; line-height: 1.4; }
.app-bg .brand-affiliate-remove { position: absolute; top: 20px; right: 22px; padding: 7px 9px; border: 0; background: transparent; color: #a63229; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.app-bg .brand-affiliate-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 24px; }
.app-bg .brand-affiliate-actions .button { min-width: 210px; }
.app-bg .brand-affiliate-success { justify-items: start; padding: 50px 38px; border: 0; border-radius: 0; box-shadow: none; }
.app-bg .brand-affiliate-success-mark { display: grid; width: 58px; height: 58px; margin-bottom: 20px; place-items: center; border: 2px solid var(--ot-petrol); border-radius: 50%; background: var(--ot-citrus); font-size: 28px; font-weight: 900; }
.app-bg .brand-affiliate-success h1 { max-width: 780px; font-size: clamp(38px, 5vw, 60px); }
.app-bg .brand-affiliate-success > p { max-width: 720px; margin: 22px 0 28px; color: var(--ot-muted); font-size: 17px; line-height: 1.65; }
.app-bg .brand-affiliate-success .brand-affiliate-mail-warning { margin: -8px 0 28px; padding: 14px 16px; border-radius: 12px; background: #fff4e8; color: #7a4b1d; font-size: 14px; }
.app-bg .brand-affiliate-success h2 { max-width: 780px; margin: 0; color: var(--ot-petrol); font-size: clamp(34px, 4vw, 54px); line-height: 1.03; letter-spacing: -.045em; }
.app-bg .brand-affiliate-success-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.app-bg .brand-affiliate-panel { padding: 34px 38px; border: 1px solid var(--ot-line); border-radius: 24px; background: #fff; box-shadow: 7px 8px 0 rgba(22,61,66,.1); }
.app-bg .brand-affiliate-loading { color: var(--ot-muted); font-size: 15px; font-weight: 700; }
.app-bg .brand-affiliate-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.app-bg .brand-affiliate-section-head h2 { margin: 0; color: var(--ot-petrol); font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.app-bg .brand-affiliate-section-head p { margin: 8px 0 0; color: var(--ot-muted); font-size: 15px; line-height: 1.55; }
.app-bg .brand-affiliate-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.app-bg .brand-affiliate-stats > div { min-height: 108px; padding: 20px; border: 1px solid rgba(22,61,66,.15); border-radius: 16px; background: #f7f9f5; }
.app-bg .brand-affiliate-stats strong { display: block; overflow-wrap: anywhere; color: var(--ot-petrol); font-size: clamp(20px,2vw,28px); line-height: 1.1; }
.app-bg .brand-affiliate-stats span { display: block; margin-top: 9px; color: var(--ot-muted); font-size: 12px; font-weight: 750; }
.app-bg .brand-affiliate-stats.compact { margin: 24px 0 30px; }
.app-bg .brand-affiliate-filter { display: grid; gap: 7px; min-width: 190px; color: var(--ot-petrol); font-size: 12px; font-weight: 800; }
.app-bg .brand-affiliate-filter select,
.app-bg .brand-affiliate-filter input { min-height: 44px; padding: 10px 38px 10px 12px; border: 1px solid rgba(22,61,66,.25); border-radius: 11px; background-color: #fff; color: var(--ot-petrol); font: inherit; font-size: 13px; font-weight: 650; }
.app-bg .brand-affiliate-request-list,
.app-bg .brand-affiliate-transactions { display: grid; gap: 10px; }
.app-bg .brand-affiliate-request-list article,
.app-bg .brand-affiliate-transactions article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; border: 1px solid rgba(22,61,66,.14); border-radius: 14px; background: #fbfcfa; }
.app-bg .brand-affiliate-request-list article > div,
.app-bg .brand-affiliate-transactions article > div { display: grid; gap: 5px; }
.app-bg .brand-affiliate-request-list article > div:last-child,
.app-bg .brand-affiliate-transactions article > div:last-child { justify-items: end; text-align: right; }
.app-bg .brand-affiliate-request-list strong,
.app-bg .brand-affiliate-transactions strong { color: var(--ot-petrol); font-size: 15px; }
.app-bg .brand-affiliate-request-list span:not(.brand-affiliate-status),
.app-bg .brand-affiliate-request-list small,
.app-bg .brand-affiliate-transactions span:not(.brand-affiliate-status) { color: var(--ot-muted); font-size: 12px; }
.app-bg .brand-affiliate-status { display: inline-flex; width: fit-content; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; line-height: 1; }
.app-bg .brand-affiliate-status.tone-waiting { background: #fff2cf; color: #76500b; }
.app-bg .brand-affiliate-status.tone-approved { background: #e8edff; color: #2349bd; }
.app-bg .brand-affiliate-status.tone-registered { background: #e7f6d2; color: #345b13; }
.app-bg .brand-affiliate-status.tone-rejected { background: #fee5e1; color: #9a3028; }
.app-bg .brand-affiliate-team-controls,
.app-bg .brand-affiliate-detail-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.app-bg .brand-affiliate-team-list { display: grid; gap: 11px; }
.app-bg .brand-affiliate-team-list > button { display: grid; grid-template-columns: auto minmax(180px,1fr) minmax(90px,.35fr) minmax(130px,.45fr) auto; align-items: center; gap: 16px; width: 100%; padding: 17px 18px; border: 1px solid rgba(22,61,66,.16); border-radius: 16px; background: #fbfcfa; color: var(--ot-petrol); text-align: left; cursor: pointer; transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.app-bg .brand-affiliate-team-list > button:hover,
.app-bg .brand-affiliate-team-list > button:focus-visible { transform: translateY(-2px); border-color: var(--ot-cobalt); box-shadow: 0 8px 22px rgba(22,61,66,.09); outline: none; }
.app-bg .brand-affiliate-avatar { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--ot-cobalt); color: #fff; font-size: 16px; font-weight: 850; }
.app-bg .brand-affiliate-person,
.app-bg .brand-affiliate-metric { display: grid; gap: 5px; }
.app-bg .brand-affiliate-person strong,
.app-bg .brand-affiliate-metric strong { font-size: 14px; }
.app-bg .brand-affiliate-person small,
.app-bg .brand-affiliate-metric small { color: var(--ot-muted); font-size: 11px; }
.app-bg .brand-affiliate-open { color: var(--ot-cobalt); font-size: 12px; font-weight: 800; }
.app-bg .brand-affiliate-empty { padding: 28px; border: 1px dashed rgba(22,61,66,.25); border-radius: 14px; color: var(--ot-muted); text-align: center; font-size: 14px; }
.app-bg .brand-affiliate-detail { border-color: var(--ot-cobalt); background: #f4f7ff; box-shadow: 8px 9px 0 var(--ot-citrus); scroll-margin-top: 24px; }
.app-bg .brand-affiliate-detail h3 { margin: 0 0 14px; color: var(--ot-petrol); font-size: 20px; }
.app-bg .brand-affiliate-overview { margin: 0; padding: 0 44px 34px; background: #eef3ff; }
.app-bg .brand-affiliate-overview > div { background: rgba(255,255,255,.84); }
.app-bg .brand-affiliate-overview-error { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 44px 28px; background: #eef3ff; color: #9a3028; font-size: 13px; font-weight: 700; }
.app-bg .brand-affiliate-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 12px 14px; border-top: 1px solid var(--ot-line); border-bottom: 1px solid var(--ot-line); background: #f8f8f3; position: sticky; top: 0; z-index: 3; scroll-margin-top: 16px; }
.app-bg .brand-affiliate-tabs button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 11px 15px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--ot-muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease; }
.app-bg .campaign-contact-total { display: block; width: fit-content; margin-top: 16px; padding: 9px 13px; border-radius: 999px; background: var(--ot-citrus); color: var(--ot-petrol); font-size: 15px; line-height: 1.2; }
.app-bg .brand-affiliate-shared-campaigns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.app-bg .brand-affiliate-shared-campaigns span { padding: 8px 11px; border-radius: 999px; background: var(--ot-pale-blue); color: var(--ot-petrol); font-size: 12px; font-weight: 800; }
.app-bg .brand-affiliate-tabs button span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: rgba(22,61,66,.08); font-size: 11px; }
.app-bg .brand-affiliate-tabs button:hover { color: var(--ot-petrol); transform: translateY(-1px); }
.app-bg .brand-affiliate-tabs button:focus-visible { outline: 3px solid rgba(47,91,234,.18); outline-offset: 1px; }
.app-bg .brand-affiliate-tabs button.is-active { border-color: var(--ot-petrol); background: var(--ot-petrol); color: #fff; box-shadow: 0 4px 0 var(--ot-citrus); }
.app-bg .brand-affiliate-tabs button.is-active span { background: var(--ot-citrus); color: var(--ot-petrol); }
.app-bg .brand-affiliate-tab-panel { min-height: 430px; background: #fff; }
.app-bg .brand-affiliate-list-view,
.app-bg .brand-affiliate-transactions-view { padding: 36px 38px 42px; }
.app-bg .brand-affiliate-view-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.app-bg .brand-affiliate-view-heading h2 { margin: 0; font-size: clamp(28px,3vw,40px); line-height: 1.05; letter-spacing: -.04em; }
.app-bg .brand-affiliate-view-heading p { margin: 10px 0 0; color: var(--ot-muted); font-size: 15px; line-height: 1.55; }
.app-bg .brand-affiliate-result-count { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: #eef3ff; color: var(--ot-cobalt); font-size: 12px; font-weight: 850; }
.app-bg .brand-affiliate-list-search { margin-bottom: 16px; }
.app-bg .brand-affiliate-list-search label { display: grid; gap: 7px; color: var(--ot-petrol); font-size: 12px; font-weight: 800; }
.app-bg .brand-affiliate-list-search input { width: 100%; min-height: 48px; padding: 11px 14px 11px 42px; border: 1px solid rgba(22,61,66,.25); border-radius: 13px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235c7073' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 14px center; color: var(--ot-petrol); font: inherit; font-size: 14px; }
.app-bg .brand-affiliate-list-search input:focus { border-color: var(--ot-cobalt); outline: 3px solid rgba(47,91,234,.14); }
.app-bg .brand-affiliate-list-toolbar { display: grid; grid-template-columns: minmax(280px,1fr) minmax(170px,.48fr) minmax(180px,.52fr); align-items: end; gap: 12px; margin-bottom: 24px; padding: 16px; border-radius: 16px; background: #f5f7f2; }
.app-bg .brand-affiliate-list-toolbar fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.app-bg .brand-affiliate-list-toolbar legend { margin-bottom: 7px; color: var(--ot-petrol); font-size: 12px; font-weight: 800; }
.app-bg .brand-affiliate-status-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.app-bg .brand-affiliate-status-tabs button { min-height: 44px; padding: 9px 12px; border: 1px solid rgba(22,61,66,.2); border-radius: 10px; background: #fff; color: var(--ot-muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.app-bg .brand-affiliate-status-tabs button.is-active { border-color: var(--ot-cobalt); background: var(--ot-cobalt); color: #fff; }
.app-bg .brand-affiliate-avatar.is-pending { background: #e8edff; color: var(--ot-cobalt); }
.app-bg .brand-affiliate-team-list > button { grid-template-columns: auto minmax(160px,1fr) auto minmax(88px,.32fr) minmax(120px,.42fr) auto; }
.app-bg .brand-affiliate-transaction-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; padding: 16px; border-radius: 16px; background: #f5f7f2; }
.app-bg .brand-affiliate-transaction-toolbar .brand-affiliate-filter { min-width: 0; }
.app-bg .brand-affiliate-name-search input { padding-right: 12px; }
.app-bg .brand-affiliate-name-search input:disabled { background: #edf0eb; color: var(--ot-muted); cursor: not-allowed; }
.app-bg .brand-affiliate-transaction-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; color: var(--ot-muted); font-size: 13px; }
.app-bg .brand-affiliate-transaction-summary strong { color: var(--ot-petrol); font-size: 16px; }
.app-bg .brand-affiliate-inline-loading { margin: -6px 0 14px; color: var(--ot-cobalt); font-size: 12px; font-weight: 750; }
.app-bg .brand-affiliate-transaction-table { overflow: hidden; border: 1px solid rgba(22,61,66,.15); border-radius: 16px; }
.app-bg .brand-affiliate-transaction-head,
.app-bg .brand-affiliate-transaction-table > button { display: grid; grid-template-columns: .75fr 1.25fr .9fr 1fr .85fr; align-items: center; gap: 14px; padding: 14px 16px; }
.app-bg .brand-affiliate-transaction-head { background: var(--ot-petrol); color: #fff; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.app-bg .brand-affiliate-transaction-table > button { width: 100%; border: 0; border-top: 1px solid rgba(22,61,66,.1); background: #fff; color: var(--ot-petrol); font: inherit; font-size: 12px; text-align: left; cursor: pointer; transition: background .16s ease; }
.app-bg .brand-affiliate-transaction-table > button:first-of-type { border-top: 0; }
.app-bg .brand-affiliate-transaction-table > button:hover,
.app-bg .brand-affiliate-transaction-table > button:focus-visible { background: #f4f7ff; outline: none; }
.app-bg .brand-affiliate-transaction-table i { font-style: normal; }
.app-bg .brand-affiliate-drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(8,28,31,.48); backdrop-filter: blur(2px); }
.app-bg .brand-affiliate-drawer { position: fixed; top: 0; right: 0; z-index: 81; width: min(480px,100%); height: 100dvh; overflow-y: auto; padding: 48px 38px; border-left: 1px solid var(--ot-line); background: #fff; box-shadow: -20px 0 50px rgba(8,28,31,.18); animation: affiliate-drawer-in .2s ease-out; }
.app-bg .brand-affiliate-drawer-wide { width: min(620px,100%); }
.app-bg .brand-affiliate-drawer-close { position: absolute; top: 18px; right: 20px; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--ot-line); border-radius: 50%; background: #fff; color: var(--ot-petrol); font: inherit; font-size: 24px; cursor: pointer; }
.app-bg .brand-affiliate-drawer h2 { margin: 0 0 18px; padding-right: 38px; font-size: clamp(32px,4vw,48px); line-height: 1; letter-spacing: -.045em; }
.app-bg .brand-affiliate-drawer h3 { margin: 28px 0 14px; font-size: 20px; }
.app-bg .brand-affiliate-drawer dl { display: grid; gap: 0; margin: 28px 0; border-top: 1px solid var(--ot-line); }
.app-bg .brand-affiliate-drawer dl div { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--ot-line); }
.app-bg .brand-affiliate-drawer dt { color: var(--ot-muted); font-size: 12px; font-weight: 750; }
.app-bg .brand-affiliate-drawer dd { margin: 0; color: var(--ot-petrol); font-size: 13px; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.app-bg .brand-affiliate-proof-link { display: flex; width: 100%; margin-top: 22px; align-items: center; justify-content: space-between; }
.app-bg .brand-affiliate-proof-unavailable { margin-top: 20px; color: var(--ot-muted); font-size: 13px; line-height: 1.55; }
.app-bg .brand-affiliate-next-step { padding: 20px; border-radius: 16px; background: #eef3ff; }
.app-bg .brand-affiliate-next-step p { margin: 8px 0 0; color: var(--ot-muted); font-size: 14px; line-height: 1.55; }
@keyframes affiliate-drawer-in { from { transform: translateX(22px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 900px) {
  .ot-app-header .nav,
  .ot-app-header .app-nav,
  .app-bg .dashboard,
  .app-bg .profile-shell,
  .app-bg .center-page,
  .app-bg .settings-profile-page { width: min(100% - 32px, 1200px); }
  .ot-app-header .header-user-identity { display: none; }
  .login-page .auth-layout { grid-template-columns: 1fr; }
  .login-page .auth-art { display: none; }
  .app-bg .brand-affiliate-hero { grid-template-columns: 1fr; }
  .app-bg .brand-affiliate-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-bg .brand-affiliate-team-list > button { grid-template-columns: auto minmax(170px,1fr) minmax(90px,.35fr); }
  .app-bg .brand-affiliate-team-list .brand-affiliate-metric:nth-of-type(2),
  .app-bg .brand-affiliate-team-list .brand-affiliate-open { display: none; }
  .app-bg .brand-affiliate-list-toolbar { grid-template-columns: 1fr 1fr; }
  .app-bg .brand-affiliate-list-toolbar fieldset { grid-column: 1 / -1; }
  .app-bg .brand-affiliate-transaction-toolbar { grid-template-columns: 1fr 1fr; }
  .app-bg .brand-affiliate-transaction-head,
  .app-bg .brand-affiliate-transaction-table > button { grid-template-columns: .8fr 1.25fr 1fr .8fr; }
  .app-bg .brand-affiliate-transaction-head span:nth-child(3),
  .app-bg .brand-affiliate-transaction-table > button span:nth-child(3) { display: none; }
}

@media (max-width: 620px) {
  .ot-app-header .nav,
  .ot-app-header .app-nav { min-height: 76px; }
  .ot-shell-brand-crop { width: 148px; height: 46px; }
  .ot-shell-brand-crop img { left: -35px; top: -88px; width: 246px; }
  .ot-app-header .user-tools { gap: 0; }
  .ot-app-header .user-tools :where(.header-user-identity, .text-link) { display: none; }
  .ot-app-header .header-actions { gap: 7px; }
  .ot-app-header .user-tools .button.soft { min-height: 42px; padding: 9px 12px; font-size: 12px; }
  .ot-app-header .header-refresh { width: 42px; min-width: 42px; padding-inline: 0; justify-content: center; gap: 0; }
  .ot-app-header .header-refresh span:last-child { display: none; }
  .login-page .center-page { padding-top: 34px; }
  .login-page .auth-layout { border-radius: 22px; }
  .login-page .auth-card { padding: 40px 24px; }
  .login-page .auth-card h1 { font-size: 39px; }
  .app-bg .dashboard { padding-top: 42px; }
  .app-bg .settings-profile-page { padding-top: 42px; }
  .app-bg .welcome h1 { font-size: 44px; }
  .app-bg .panel { padding: 24px; }
  .app-bg .workspace-settings-actions {
    display: grid;
    justify-items: start;
    gap: 16px;
    margin-top: 20px;
  }
  .app-bg .settings-hub-heading { padding: 26px 24px; }
  .app-bg .settings-scope-navigation { grid-template-columns: 1fr; }
  .app-bg .settings-scope-navigation button { min-height: 96px; padding: 19px 20px; }
  .app-bg .settings-scope-panel { gap: 22px; }
  .app-bg .settings-personal-stack > #operator-access-settings { margin-bottom: 22px; }
  .app-bg .settings-personal-stack > #operator-access-settings[hidden] + #auto-publishing-settings { margin-top: 22px; }
  .app-bg .operator-access-heading { display: grid; gap: 14px; }
  .app-bg .operator-access-state { width: max-content; }
  .app-bg .operator-access-facts { grid-template-columns: 1fr; }
  .app-bg .operator-access-facts>div+div { border-top: 1px solid var(--ot-line); border-left: 0; }
  .app-bg .operator-access-actions { display: grid; grid-template-columns: 1fr; }
  .app-bg .profile-main h1 { font-size: 34px; }
  .app-bg .gateway { padding: 34px 24px; }
  .app-bg .gateway-actions { flex-direction: column; }
  .app-bg .brand-affiliate { gap: 20px; }
  .app-bg .brand-affiliate-hero,
  .app-bg .brand-affiliate-form,
  .app-bg .brand-affiliate-success { padding: 26px 20px; border-radius: 20px; box-shadow: 6px 7px 0 var(--ot-cobalt); }
  .app-bg .brand-affiliate-hero > div > p { font-size: 15px; }
  .app-bg .brand-affiliate-flow { grid-template-columns: 1fr; }
  .app-bg .brand-affiliate-flow i { display: none; }
  .app-bg .brand-affiliate-flow span { min-height: 0; }
  .app-bg .brand-affiliate-form { box-shadow: 6px 7px 0 var(--ot-coral); }
  .app-bg .brand-affiliate-form-heading { align-items: start; }
  .app-bg .brand-affiliate-fields { grid-template-columns: 1fr; }
  .app-bg .brand-affiliate-row { padding: 21px 16px; }
  .app-bg .brand-affiliate-remove { top: 18px; right: 13px; }
  .app-bg .brand-affiliate-actions { display: grid; grid-template-columns: 1fr; }
  .app-bg .brand-affiliate-actions .button { width: 100%; min-width: 0; }
  .app-bg .brand-affiliate-success { box-shadow: 6px 7px 0 var(--ot-citrus); }
  .app-bg .brand-affiliate-panel { padding: 26px 20px; border-radius: 20px; }
  .app-bg .brand-affiliate-section-head { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; }
  .app-bg .brand-affiliate-section-head > .text-button { justify-self: start; }
  .app-bg .brand-affiliate-section-head > .brand-affiliate-filter { width: 100%; }
  .app-bg .brand-affiliate-stats { grid-template-columns: 1fr 1fr; }
  .app-bg .brand-affiliate-stats > div { min-height: 94px; padding: 16px; }
  .app-bg .brand-affiliate-team-controls,
  .app-bg .brand-affiliate-detail-controls { display: grid; grid-template-columns: 1fr; }
  .app-bg .brand-affiliate-filter { min-width: 0; }
  .app-bg .brand-affiliate-team-list > button { grid-template-columns: auto minmax(0,1fr); gap: 12px; }
  .app-bg .brand-affiliate-team-list .brand-affiliate-metric { display: grid; grid-column: 2; }
  .app-bg .brand-affiliate-team-list .brand-affiliate-open { display: block; grid-column: 2; }
  .app-bg .brand-affiliate-request-list article,
  .app-bg .brand-affiliate-transactions article { align-items: start; }
  .app-bg .brand-affiliate-workspace { border-radius: 20px; box-shadow: 6px 7px 0 var(--ot-cobalt); }
  .app-bg .brand-affiliate-hero { display: grid; gap: 18px; padding: 28px 20px 22px; border: 0; border-radius: 0; box-shadow: none; }
  .app-bg .brand-affiliate-refresh { justify-self: start; margin: 0; }
  .app-bg .brand-affiliate-overview { padding: 0 20px 24px; }
  .app-bg .brand-affiliate-tabs { gap: 5px; padding: 8px; }
  .app-bg .brand-affiliate-tabs button { flex-direction: column; gap: 6px; min-height: 68px; padding: 9px 5px; font-size: 13px; line-height: 1.15; }
  .app-bg .brand-affiliate-tabs button span { width: 23px; height: 23px; font-size: 11px; }
  .app-bg .brand-affiliate-tab-panel { min-height: 360px; }
  .app-bg .brand-affiliate-form,
  .app-bg .brand-affiliate-success,
  .app-bg .brand-affiliate-list-view,
  .app-bg .brand-affiliate-transactions-view { padding: 28px 20px 32px; border: 0; border-radius: 0; box-shadow: none; }
  .app-bg .brand-affiliate-success-actions { display: grid; width: 100%; }
  .app-bg .brand-affiliate-success-actions .button { width: 100%; }
  .app-bg .brand-affiliate-view-heading { display: grid; align-items: start; gap: 14px; }
  .app-bg .brand-affiliate-result-count { justify-self: start; }
  .app-bg .brand-affiliate-list-toolbar,
  .app-bg .brand-affiliate-transaction-toolbar { grid-template-columns: 1fr; padding: 14px; }
  .app-bg .brand-affiliate-list-toolbar fieldset { grid-column: auto; }
  .app-bg .brand-affiliate-team-list > button { grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; padding: 15px 14px; }
  .app-bg .brand-affiliate-team-list .brand-affiliate-status { grid-column: 3; grid-row: 1; }
  .app-bg .brand-affiliate-team-list .brand-affiliate-metric { display: grid; grid-column: 2; }
  .app-bg .brand-affiliate-team-list .brand-affiliate-open { display: block; grid-column: 2 / -1; }
  .app-bg .brand-affiliate-transaction-head { display: none; }
  .app-bg .brand-affiliate-transaction-table { display: grid; gap: 10px; overflow: visible; border: 0; border-radius: 0; }
  .app-bg .brand-affiliate-transaction-table > button { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 17px; border: 1px solid rgba(22,61,66,.15); border-radius: 15px; }
  .app-bg .brand-affiliate-transaction-table > button:first-of-type { border-top: 1px solid rgba(22,61,66,.15); }
  .app-bg .brand-affiliate-transaction-table > button span:nth-child(3) { display: grid; }
  .app-bg .brand-affiliate-transaction-table > button span { display: grid; gap: 4px; }
  .app-bg .brand-affiliate-transaction-table > button span::before { content: attr(data-label); color: var(--ot-muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .app-bg .brand-affiliate-drawer { padding: 52px 22px 28px; }
  .app-bg .brand-affiliate-drawer .brand-affiliate-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  :where(.login-page, .app-bg) *,
  :where(.login-page, .app-bg) *::before,
  :where(.login-page, .app-bg) *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* A phone in landscape has desktop-like width but mobile-like usable height. */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .ot-app-header .nav,
  .ot-app-header .app-nav { min-height: 66px; }
  .ot-shell-brand-crop { width: 148px; height: 46px; }
  .ot-shell-brand-crop img { left: -35px; top: -88px; width: 246px; }
  .ot-app-header .user-tools { gap: 0; }
  .ot-app-header .user-tools :where(.header-user-identity, .text-link) { display: none; }
  .ot-app-header .header-actions { gap: 7px; }
  .ot-app-header .user-tools .button.soft { min-height: 40px; padding: 8px 11px; font-size: 12px; }
  .ot-app-header .header-refresh { width: 40px; min-width: 40px; padding-inline: 0; justify-content: center; gap: 0; }
  .ot-app-header .header-refresh span:last-child { display: none; }

  .app-bg .workspace-navigation { margin-bottom: 20px; }
  .app-bg .workspace-menu-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 60px;
    padding: 9px 13px;
    border: 1px solid var(--ot-line);
    border-radius: 18px;
    background: #fff;
    color: var(--ot-petrol);
    text-align: left;
    box-shadow: 0 10px 30px rgba(22,61,66,.07);
    cursor: pointer;
  }
  .app-bg .workspace-menu-toggle-icon { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; margin-right: 11px; border-radius: 12px; background: var(--ot-citrus); color: var(--ot-petrol); }
  .app-bg .workspace-menu-toggle-icon svg { width: 20px; height: 20px; }
  .app-bg .workspace-menu-toggle-copy { display: grid; flex: 1; min-width: 0; gap: 1px; }
  .app-bg .workspace-menu-toggle-copy > small { color: var(--ot-cobalt); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
  .app-bg .workspace-menu-toggle-copy > strong { font-size: 16px; line-height: 1.25; }
  .app-bg .workspace-menu-toggle-copy > span { overflow: hidden; color: var(--ot-muted); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
  .app-bg .workspace-menu-chevron { flex: 0 0 auto; width: 20px; height: 20px; margin-left: 10px; }
  .app-bg .workspace-menu-toggle[aria-expanded="true"] .workspace-menu-chevron { transform: rotate(180deg); }

  .app-bg .workspace-navigation .workspace-nav {
    display: none;
    position: absolute;
    z-index: 35;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    max-height: min(72dvh, 310px);
    padding: 13px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(18,63,70,.22);
    overflow-y: auto;
  }
  .app-bg .workspace-navigation .workspace-nav.is-open { display: grid; gap: 10px; }
  .app-bg .workspace-navigation.menu-open::before { position: fixed; z-index: 34; inset: 0; background: rgba(18,63,70,.2); content: ""; }
  .app-bg .workspace-navigation.menu-open .workspace-menu-toggle,
  .app-bg .workspace-navigation.menu-open .workspace-nav { position: relative; z-index: 35; }
  .app-bg .workspace-navigation.menu-open .workspace-nav { position: absolute; }
  .app-bg .workspace-nav-group,
  .app-bg .workspace-nav-group:first-child,
  .app-bg .workspace-nav-group:nth-child(2),
  .app-bg .workspace-nav-group:nth-child(3),
  .app-bg .workspace-nav-group:last-child { display: grid; gap: 6px; padding: 0 0 10px; border: 0; border-bottom: 1px solid var(--ot-line); }
  .app-bg .workspace-nav-group:last-child { padding-bottom: 0; border-bottom: 0; }
  .app-bg .workspace-nav-group-label { padding: 0 5px; color: var(--ot-cobalt); font-size: 9px; }
  .app-bg .workspace-nav-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .app-bg .workspace-navigation .workspace-nav button { justify-content: flex-start; min-height: 62px; padding: 10px; border: 1px solid var(--ot-line); border-radius: 14px; background: #fbfcfa; color: var(--ot-petrol); text-align: left; white-space: normal; }
  .app-bg .workspace-navigation .workspace-nav button.active { border-color: var(--ot-petrol); background: var(--ot-petrol); color: #fff; }
  .app-bg .workspace-nav-copy { display: grid; gap: 2px; }
  .app-bg .workspace-nav-copy strong { font-size: 13px; }
  .app-bg .workspace-nav-copy small { display: block; color: var(--ot-muted); font-size: 10px; font-weight: 500; line-height: 1.3; }
  .app-bg .workspace-navigation .workspace-nav button.active small { color: #dce9ea; }
}
