.theme-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.ft-global-header {
  position: relative;
  overflow: hidden;
  margin: 0 22px 14px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 154, 61, 0.24);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 131, 20, 0.22), transparent 26%),
    radial-gradient(circle at 78% 22%, rgba(255, 173, 74, 0.1), transparent 20%),
    linear-gradient(135deg, rgba(27, 20, 15, 0.98), rgba(18, 13, 10, 0.94));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 154, 61, 0.08),
    0 0 38px rgba(255, 122, 0, 0.08),
    inset 0 1px 0 rgba(255, 214, 180, 0.03);
}

.ft-global-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 160, 68, 0.08), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%);
  pointer-events: none;
}

.ft-global-header::after {
  content: "";
  position: absolute;
  left: 98px;
  right: 24px;
  top: 32px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 154, 61, 0.32),
    rgba(255, 154, 61, 0.04) 46%,
    transparent
  );
  pointer-events: none;
}

.ft-global-main {
  display: grid;
  grid-template-columns: minmax(420px, 1.45fr) minmax(240px, 0.82fr) auto;
  gap: 16px;
  align-items: center;
}

.ft-brand-lockup {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-areas:
    "badge kicker"
    "badge title"
    "badge meta";
  gap: 2px 16px;
  min-width: 0;
  align-items: center;
}

.ft-brand-lockup::before {
  content: "FT";
  grid-area: badge;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  color: #ffd7ae;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background:
    radial-gradient(circle at 38% 35%, rgba(255, 192, 124, 0.38), transparent 28%),
    linear-gradient(180deg, rgba(255, 139, 31, 0.28), rgba(80, 36, 11, 0.62));
  border: 1px solid rgba(255, 175, 91, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 222, 0.18),
    0 0 0 1px rgba(255, 154, 61, 0.08),
    0 10px 30px rgba(255, 122, 0, 0.18),
    0 0 24px rgba(255, 162, 73, 0.12);
}

.ft-brand-kicker {
  grid-area: kicker;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffb76e;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 154, 61, 0.18);
}

.ft-brand-title {
  grid-area: title;
  display: block;
  color: #fff4e7;
  font-size: 38px;
  line-height: 0.98;
  font-weight: 800;
  text-shadow:
    0 0 20px rgba(255, 173, 88, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.2);
}

.ft-brand-meta {
  grid-area: meta;
  display: block;
  color: #ddb38d;
  font-size: 13px;
  line-height: 1.5;
  max-width: 640px;
}

.ft-header-status {
  position: relative;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 154, 61, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.02);
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 233, 210, 0.06),
    0 0 24px rgba(255, 122, 0, 0.05);
}

.ft-header-status::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 154, 61, 0.24), transparent);
}

.ft-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 13, 0.12);
  border: 1px solid rgba(255, 154, 61, 0.24);
  color: #ffbb78;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ft-header-status p {
  margin: 10px 0 0;
  color: #ddb38d;
  font-size: 13px;
  line-height: 1.55;
}

.ft-header-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ft-header-controls .lang-switch,
.ft-header-controls .theme-switch {
  justify-content: flex-end;
}

.ft-brand-lockup:hover .ft-brand-title {
  color: #fff8ef;
}

.ft-brand-lockup:hover::before {
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 222, 0.18),
    0 0 0 1px rgba(255, 154, 61, 0.08),
    0 12px 34px rgba(255, 122, 0, 0.24),
    0 0 34px rgba(255, 162, 73, 0.18);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 154, 61, 0.22);
  background: rgba(37, 24, 17, 0.84);
  color: #ebd4bf;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(255, 122, 0, 0.08);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease;
  cursor: pointer;
}

.theme-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 188, 119, 0.3);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 188, 119, 0.1);
}

.theme-btn.active {
  background: linear-gradient(180deg, #ffb65f 0%, #ff8b28 100%);
  color: #2b1608;
  border-color: rgba(201, 116, 38, 0.34);
}

body[data-theme="light"] {
  color-scheme: light;
}

body[data-theme="light"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 186, 118, 0.16), transparent 22%),
    linear-gradient(180deg, #efd9c0 0%, #ead2b6 100%) !important;
}

body[data-theme="light"] .wrap {
  padding-top: 26px;
}

body[data-theme="light"] .shell {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 173, 94, 0.12), transparent 26%),
    linear-gradient(180deg, #fbf0e3 0%, #efd6b8 100%) !important;
  border-color: rgba(172, 103, 41, 0.16);
  box-shadow:
    0 34px 80px rgba(66, 32, 13, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body[data-theme="light"] .lang-btn {
  background: rgba(255, 245, 232, 0.86);
  border-color: rgba(171, 104, 44, 0.18);
  color: #5c3726;
  box-shadow: 0 0 16px rgba(255, 184, 116, 0.08);
}

body[data-theme="light"] .lang-btn.active {
  background: linear-gradient(180deg, #ffb65f 0%, #ff8b28 100%);
  color: #2b1608;
  border-color: rgba(197, 111, 35, 0.34);
}

body[data-theme="light"] .theme-btn {
  background: rgba(255, 245, 232, 0.86);
  border-color: rgba(171, 104, 44, 0.18);
  color: #5c3726;
}

body[data-theme="light"] .theme-btn.active {
  background: linear-gradient(180deg, #ffb65f 0%, #ff8b28 100%);
  color: #2b1608;
}

body[data-theme="light"] .topbar {
  background:
    linear-gradient(180deg, rgba(255, 194, 136, 0.16), rgba(255, 122, 0, 0) 76%) !important;
  border-bottom-color: rgba(171, 104, 44, 0.12);
}

body[data-theme="light"] .ft-global-header {
  border-color: rgba(173, 108, 46, 0.16);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 163, 86, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255, 247, 238, 0.98), rgba(244, 222, 196, 0.94));
  box-shadow:
    0 18px 34px rgba(64, 31, 12, 0.08),
    0 0 28px rgba(255, 158, 77, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

body[data-theme="light"] .ft-global-header::after {
  background: linear-gradient(
    90deg,
    rgba(184, 104, 34, 0.28),
    rgba(184, 104, 34, 0.04) 46%,
    transparent
  );
}

body[data-theme="light"] .ft-brand-title {
  color: #27160d;
}

body[data-theme="light"] .ft-brand-meta,
body[data-theme="light"] .ft-header-status p {
  color: #5f3b2a;
}

body[data-theme="light"] .ft-brand-kicker,
body[data-theme="light"] .ft-status-pill {
  color: #8b4f20;
}

body[data-theme="light"] .ft-brand-lockup::before {
  color: #6f3d16;
  background:
    radial-gradient(circle at 38% 35%, rgba(255, 255, 255, 0.5), transparent 24%),
    linear-gradient(180deg, rgba(255, 180, 102, 0.42), rgba(197, 114, 43, 0.22));
  border-color: rgba(181, 104, 37, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 10px 24px rgba(201, 122, 51, 0.14),
    0 0 20px rgba(255, 172, 92, 0.08);
}

body[data-theme="light"] .ft-header-status {
  background: rgba(255, 249, 243, 0.72);
  border-color: rgba(173, 108, 46, 0.14);
}

body[data-theme="light"] .ft-status-pill {
  background: rgba(255, 176, 96, 0.18);
  border-color: rgba(173, 108, 46, 0.22);
}

body[data-theme="light"] .header-band {
  border-color: rgba(176, 103, 39, 0.18);
  box-shadow:
    0 18px 34px rgba(71, 37, 14, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  filter: saturate(0.92) brightness(1.06);
}

body[data-theme="light"] .notice,
body[data-theme="light"] .message {
  color: #4c2b1b;
}

body[data-theme="light"] .notice {
  background: rgba(255, 243, 228, 0.88) !important;
  border-color: rgba(171, 104, 44, 0.16) !important;
}

body[data-theme="light"] .message {
  background:
    linear-gradient(180deg, rgba(255, 224, 188, 0.96), rgba(244, 199, 146, 0.92)) !important;
  border-color: rgba(176, 103, 39, 0.2) !important;
  box-shadow:
    0 14px 24px rgba(64, 31, 12, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

body[data-theme="light"] .hero-card,
body[data-theme="light"] .portal-overview,
body[data-theme="light"] .panel,
body[data-theme="light"] .mini,
body[data-theme="light"] .highlight,
body[data-theme="light"] .footer {
  box-shadow:
    0 18px 34px rgba(64, 31, 12, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body[data-theme="light"] .hero-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 185, 115, 0.24), transparent 34%),
    linear-gradient(135deg, #fff4e8 0%, #f6dec0 44%, #eed0ad 100%) !important;
  border-color: rgba(176, 103, 39, 0.16);
}

body[data-theme="light"] .hero-visual {
  border-color: rgba(176, 103, 39, 0.16) !important;
  box-shadow:
    0 18px 30px rgba(64, 31, 12, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  filter: saturate(0.95) brightness(1.03);
}

body[data-theme="light"] .hero-copy .label,
body[data-theme="light"] .head,
body[data-theme="light"] .block h3,
body[data-theme="light"] .highlight strong,
body[data-theme="light"] .mini h4 {
  color: #8b4f20 !important;
}

body[data-theme="light"] .hero-copy h1,
body[data-theme="light"] .portal-overview h2 {
  color: #27160d;
}

body[data-theme="light"] .hero-copy p,
body[data-theme="light"] .portal-overview p,
body[data-theme="light"] .block p,
body[data-theme="light"] .highlight span,
body[data-theme="light"] .mini p,
body[data-theme="light"] .footer {
  color: #5f3b2a !important;
}

body[data-theme="light"] .panel {
  background:
    linear-gradient(180deg, rgba(252, 241, 228, 0.97), rgba(244, 221, 195, 0.95));
  border-color: rgba(171, 104, 44, 0.14);
}

body[data-theme="light"] .head {
  background:
    linear-gradient(90deg, rgba(255, 186, 118, 0.24), rgba(255, 236, 216, 0.68)) !important;
  border-bottom-color: rgba(171, 104, 44, 0.14);
}

body[data-theme="light"] .leftnav a {
  background: rgba(255, 248, 240, 0.62);
  border-color: rgba(171, 104, 44, 0.1);
  color: #5b3726;
}

body[data-theme="light"] .leftnav a.active {
  background:
    linear-gradient(90deg, rgba(255, 176, 96, 0.24), rgba(255, 233, 206, 0.78));
  border-color: rgba(198, 113, 37, 0.22);
  color: #8b4f20;
}

body[data-theme="light"] .leftnav .ico {
  color: #936245;
}

body[data-theme="light"] .portal-overview {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(244, 222, 196, 0.95));
  border-color: rgba(171, 104, 44, 0.14);
}

body[data-theme="light"] .overview-visual {
  border-color: rgba(171, 104, 44, 0.12);
  filter: saturate(0.96) brightness(1.04);
}

body[data-theme="light"] .highlight {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.9), rgba(244, 223, 198, 0.88));
  border-color: rgba(171, 104, 44, 0.12);
}

body[data-theme="light"] .cta {
  background: rgba(255, 249, 243, 0.82);
  border-color: rgba(171, 104, 44, 0.14);
  color: #5e3927;
}

body[data-theme="light"] .cta.primary,
body[data-theme="light"] .hero-actions a.primary {
  background: linear-gradient(180deg, #ffb254 0%, #ff8320 100%);
  border-color: rgba(196, 110, 35, 0.34);
  color: #2b1608;
}

body[data-theme="light"] .hero-actions a:not(.primary) {
  background: rgba(255, 248, 240, 0.78);
  border-color: rgba(171, 104, 44, 0.16);
  color: #5e3927;
}

body[data-theme="light"] .mini {
  background:
    linear-gradient(180deg, rgba(255, 247, 238, 0.92), rgba(244, 224, 199, 0.9));
  border-color: rgba(173, 108, 46, 0.14);
}

body[data-theme="light"] .stars {
  color: #ff9d34;
}

body[data-theme="light"] .footer {
  background:
    linear-gradient(180deg, rgba(252, 240, 225, 0.94), rgba(244, 220, 194, 0.92));
  border-color: rgba(168, 100, 40, 0.14);
}

@media (max-width: 1180px) {
  .ft-global-main {
    grid-template-columns: 1fr;
  }

  .ft-global-header::after {
    left: 24px;
    top: auto;
    bottom: 86px;
  }

  .ft-header-controls {
    justify-content: flex-start;
  }

  .ft-header-controls .lang-switch,
  .ft-header-controls .theme-switch {
    justify-content: flex-start;
  }

  .ft-brand-title {
    font-size: 31px;
  }

  .ft-brand-lockup {
    grid-template-columns: 64px 1fr;
    gap: 2px 14px;
  }

  .ft-brand-lockup::before {
    width: 64px;
    height: 64px;
    font-size: 21px;
  }
}
