@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Nunito+Sans:wght@400;600;700;800&display=swap");

:root {
  --bg: #e9f0ff;
  --panel: #ffffff;
  --panel-soft: #edf3ff;
  --line: #b7c7e3;
  --text: #092550;
  --muted: #35527b;
  --accent: #245cbd;
  --accent-strong: #0f3f8c;
  --gold: #f2bf45;
  --gold-deep: #cf9300;
  --site-header-h: 84px;
  --kbd: 0px;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-padding-top: calc(var(--site-header-h) + 0.8rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: "Nunito Sans", "Segoe UI", "Trebuchet MS", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at top right, #dce9ff 0%, transparent 42%),
    radial-gradient(circle at bottom left, #dbe8ff 0%, transparent 40%),
    var(--bg);
  display: flex;
  flex-direction: column;
  padding-top: var(--site-header-h);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body[data-page="home"] {
  position: relative;
  background:
    radial-gradient(1400px 700px at -10% -20%, rgba(255, 225, 120, 0.56), transparent 62%),
    radial-gradient(1200px 560px at 110% -18%, rgba(44, 99, 201, 0.5), transparent 58%),
    linear-gradient(180deg, #f5f9ff, #dfe9ff 65%, #d4e2ff);
}

body[data-page="home"]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.52) 0 2px, transparent 2px),
    radial-gradient(circle at 24px 24px, rgba(36, 92, 189, 0.08) 0 2px, transparent 2px);
  background-size: 48px 48px, 48px 48px;
  opacity: 0.45;
}

body[data-page="home"] .page-main,
body[data-page="home"] .site-footer {
  position: relative;
  z-index: 1;
}

.shell {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1400;
  border-bottom: 1px solid rgba(10, 38, 81, 0.18);
  backdrop-filter: blur(12px);
  background: rgba(240, 247, 255, 0.9);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 0 0.9rem;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 1.05rem;
}

body[data-page="home"] .site-title {
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: 0.045em;
  color: #0b3170;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.72);
}

.site-nav {
  display: flex;
  justify-content: flex-end;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.94rem;
  transition: 120ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--line);
  background: var(--panel);
}

.nav-link.active {
  background: linear-gradient(135deg, #174ca0, #0e3a7f);
  border-color: #0e3a7f;
  color: #f8fbff;
}

.future-placeholder {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.9;
}

.future-placeholder:hover,
.future-placeholder:focus-visible {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #eef4ff);
}

.future-menu {
  position: relative;
}

.future-menu > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.94rem;
}

.future-menu > summary::-webkit-details-marker {
  display: none;
}

.future-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 12px 36px rgba(8, 20, 36, 0.16);
  padding: 0.65rem;
  z-index: 1410;
}

.future-list p {
  margin: 0.3rem 0;
  font-size: 0.92rem;
}

.add-game-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent-strong);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
}

.page-main {
  width: min(1100px, 92vw);
  margin: 1.2rem auto 2.5rem;
}

.page-main,
.time-arena-main,
.presidents-main,
.mayhem-main {
  scroll-margin-top: calc(var(--site-header-h) + 0.8rem);
  min-height: calc(100vh - var(--site-header-h));
  min-height: calc(100dvh - var(--site-header-h));
  padding-bottom: calc(var(--kbd, 0px) + env(safe-area-inset-bottom, 0px) + 0.8rem);
}

input,
textarea,
select {
  scroll-margin-top: calc(var(--site-header-h) + 1rem);
  scroll-margin-bottom: calc(var(--kbd, 0px) + env(safe-area-inset-bottom, 0px) + 0.8rem);
}

/* Home Portal */
.hub-home-main {
  display: grid;
  gap: 1rem;
}

.hub-hero {
  position: relative;
  border: 1px solid #c6d5f0;
  border-radius: 1.2rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.35) 0 8%, transparent 36%),
    radial-gradient(circle at 88% 78%, rgba(255, 216, 102, 0.22) 0 12%, transparent 42%),
    linear-gradient(130deg, #0b3e8a 0%, #245cbf 40%, #2494db 70%, #f3bf45 100%);
  box-shadow:
    0 18px 44px rgba(13, 45, 102, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1rem;
  overflow: hidden;
}

.hub-eyebrow {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 245, 214, 0.96);
  font-weight: 800;
}

.hub-hero h1 {
  margin: 0.35rem 0 0.45rem;
  font-family: "Cinzel", Georgia, serif;
  color: #ffffff;
  letter-spacing: 0.03em;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  text-shadow: 0 7px 24px rgba(6, 28, 70, 0.4);
}

.hub-hero-copy > p[data-featured-description] {
  margin: 0;
  color: rgba(244, 250, 255, 0.96);
  max-width: 56ch;
  line-height: 1.5;
}

.hub-hero-actions {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hub-btn {
  text-decoration: none;
  border-radius: 0.72rem;
  min-height: 44px;
  padding: 0.58rem 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hub-btn:hover,
.hub-btn:focus-visible {
  transform: translateY(-1px);
}

.hub-btn--primary {
  color: #f9fbff;
  background: linear-gradient(135deg, #194997, #0f3472);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 18px rgba(8, 28, 63, 0.25);
}

.hub-btn--ghost {
  color: #f4f9ff;
  border-color: rgba(241, 249, 255, 0.42);
  background: rgba(8, 30, 71, 0.24);
}

.hub-btn--small {
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
}

.hub-feature-panel {
  border: 1px solid rgba(248, 251, 255, 0.35);
  border-radius: 1rem;
  background: rgba(7, 24, 61, 0.3);
  backdrop-filter: blur(6px);
  padding: 1rem;
  color: #ecf5ff;
  display: grid;
  gap: 0.55rem;
}

.hub-feature-kicker {
  margin: 0;
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(250, 197, 85, 0.24);
  border: 1px solid rgba(255, 236, 193, 0.45);
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hub-feature-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  color: #ffffff;
}

.hub-feature-panel p {
  margin: 0;
  color: rgba(237, 247, 255, 0.9);
}

.hub-feature-tags {
  margin: 0.18rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hub-feature-tags li {
  border-radius: 999px;
  border: 1px solid rgba(240, 248, 255, 0.35);
  padding: 0.24rem 0.6rem;
  font-size: 0.79rem;
  color: #f0f8ff;
  background: rgba(4, 21, 53, 0.34);
}

.hub-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.hub-stat-card {
  border: 1px solid #c7d7f2;
  border-radius: 0.95rem;
  padding: 0.78rem 0.82rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 255, 0.94));
  box-shadow: 0 8px 20px rgba(16, 51, 105, 0.12);
}

.hub-stat-value {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
  color: #123e83;
}

.hub-stat-label {
  margin: 0.2rem 0 0;
  font-weight: 700;
  color: #1e4d97;
}

.hub-stat-subtext {
  margin: 0.18rem 0 0;
  color: #486a99;
  font-size: 0.86rem;
}

.hub-games-section {
  border: 1px solid #c4d3ef;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 246, 255, 0.95));
  padding: 1rem;
  box-shadow: 0 14px 34px rgba(13, 44, 94, 0.14);
}

.hub-section-head h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  color: #113b80;
  font-size: clamp(1.2rem, 2.8vw, 1.75rem);
}

.hub-section-head p {
  margin: 0.3rem 0 0;
  color: #365a8f;
}

.hub-card-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 0.85rem;
}

.hub-game-card {
  border: 1px solid #c6d5ef;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  padding: 0.88rem;
  box-shadow: 0 9px 24px rgba(15, 46, 96, 0.13);
  display: grid;
  gap: 0.56rem;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hub-game-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  background: var(--card-accent);
}

.hub-game-card:hover,
.hub-game-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(10, 37, 86, 0.18);
}

.hub-card-head {
  margin-top: 0.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.hub-card-icon {
  font-size: 1.45rem;
}

.hub-card-badge {
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.24rem 0.52rem;
  color: #174488;
  background: #edf4ff;
  border: 1px solid #c7d7f1;
}

.hub-game-card h3 {
  margin: 0;
  color: #113d80;
  font-size: 1.14rem;
}

.hub-game-card p {
  margin: 0;
  color: #3a5f90;
  line-height: 1.43;
}

.hub-card-tags {
  list-style: none;
  margin: 0.18rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.hub-card-tags li {
  border-radius: 999px;
  border: 1px solid #cedcf4;
  background: #f5f9ff;
  color: #2e578f;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
}

.hub-card-actions {
  margin-top: 0.2rem;
  display: flex;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.hub-card-actions .hub-btn--ghost {
  color: #184687;
  background: #eef5ff;
  border-color: #c8d8f2;
}

.hub-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0.85rem;
}

.hub-panel {
  border: 1px solid #c4d4f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.96));
  box-shadow: 0 10px 24px rgba(13, 42, 90, 0.12);
  padding: 0.95rem;
}

.hub-panel-head h2 {
  margin: 0;
  color: #113e82;
  font-size: 1.22rem;
}

.hub-panel-head p {
  margin: 0.34rem 0 0;
  color: #406490;
}

.hub-daily-badge {
  margin: 0;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #f4d178;
  background: #fff5d7;
  color: #8b5f00;
  padding: 0.2rem 0.56rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.hub-daily-bonus {
  margin: 0.7rem 0 0.8rem;
  padding: 0.6rem 0.65rem;
  border-radius: 0.72rem;
  border: 1px solid #d4e0f3;
  background: #f5f9ff;
  color: #335b90;
}

.hub-activity-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.52rem;
}

.hub-activity-item {
  border-radius: 0.76rem;
  border: 1px solid #d2def2;
  background: #f7faff;
  padding: 0.56rem 0.62rem;
}

.hub-activity-top {
  margin: 0;
  color: #103f84;
  font-weight: 700;
}

.hub-activity-bottom {
  margin: 0.2rem 0 0;
  color: #446b9b;
  font-size: 0.87rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(12, 28, 48, 0.1);
  overflow: hidden;
}

.page-head {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.2rem;
  background: var(--panel-soft);
}

.page-head h1 {
  margin: 0;
  font-size: 1.4rem;
}

.page-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

/* Time Arena */
.time-arena-page {
  background:
    radial-gradient(1000px 500px at 50% 0%, rgba(10, 10, 10, 0.5), transparent 60%),
    radial-gradient(1200px 700px at 50% 100%, rgba(0, 0, 0, 0.75), transparent 62%),
    url("../games/time-arena/assets/wall.jpg") center / cover fixed no-repeat;
  color: #f5eeff;
}

.time-arena-page .site-header {
  background: rgba(13, 10, 18, 0.85);
  border-bottom-color: rgba(231, 212, 255, 0.18);
}

.time-arena-page .site-title,
.time-arena-page .nav-link,
.time-arena-page .future-menu > summary {
  color: #f5eeff;
}

.time-arena-page .nav-link.active {
  color: #151023;
  background: #e8dcff;
  border-color: #e8dcff;
}

.time-arena-page .future-menu > summary {
  border-color: rgba(232, 220, 255, 0.35);
  background: rgba(15, 12, 22, 0.55);
}

.time-arena-page .future-placeholder {
  border-color: rgba(232, 220, 255, 0.35);
  background: rgba(15, 12, 22, 0.55);
  color: #f5eeff;
}

.time-arena-page .future-list {
  background: rgba(14, 11, 20, 0.95);
  border-color: rgba(232, 220, 255, 0.3);
}

.time-arena-main {
  width: min(1100px, 92vw);
  margin: 1.4rem auto 2.6rem;
}

.time-arena-card {
  border: 1px solid rgba(233, 214, 255, 0.24);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(16, 12, 24, 0.88), rgba(8, 6, 14, 0.88));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.time-arena-head {
  padding: 1.2rem;
  border-bottom: 1px solid rgba(233, 214, 255, 0.2);
}

.time-arena-head h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3.1vw, 2.2rem);
}

.time-arena-head p {
  margin: 0.35rem 0 0;
  color: rgba(245, 238, 255, 0.77);
}

.time-arena-candles {
  width: min(380px, 72%);
  margin: 0.8rem auto 0.2rem;
  display: block;
}

.time-arena-core {
  padding: 1rem;
}

.time-arena-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.status-chip {
  border: 1px solid rgba(223, 194, 255, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(103, 51, 160, 0.24);
  color: #f8f2ff;
  font-size: 0.88rem;
}

.time-arena-timer {
  font-size: 0.95rem;
  color: rgba(245, 238, 255, 0.8);
}

.time-arena-messages {
  border: 1px solid rgba(233, 214, 255, 0.22);
  border-radius: 0.75rem;
  background: rgba(5, 3, 9, 0.62);
  min-height: 245px;
  max-height: 360px;
  overflow: auto;
  padding: 0.85rem;
  white-space: pre-wrap;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.time-arena-hint {
  margin-top: 0.75rem;
  color: rgba(214, 185, 250, 0.92);
}

.time-arena-form {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.time-arena-input {
  flex: 1;
  min-width: 220px;
  border-radius: 0.7rem;
  border: 1px solid rgba(214, 185, 250, 0.45);
  background: rgba(0, 0, 0, 0.45);
  color: #f5eeff;
  padding: 0.7rem;
}

.time-arena-btn {
  border: 1px solid rgba(214, 185, 250, 0.5);
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(140, 80, 199, 0.45), rgba(102, 58, 146, 0.45));
  color: #fcf8ff;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.time-arena-btn--danger {
  border-color: rgba(250, 151, 151, 0.45);
  background: rgba(194, 63, 63, 0.42);
}

.time-arena-foot {
  border-top: 1px solid rgba(233, 214, 255, 0.2);
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.time-arena-foot p {
  margin: 0;
  color: rgba(245, 238, 255, 0.66);
  font-size: 0.9rem;
}

.time-arena-page .site-footer {
  border-top-color: rgba(233, 214, 255, 0.18);
  background: rgba(5, 4, 9, 0.78);
}

.time-arena-page .footer-content {
  color: rgba(245, 238, 255, 0.7);
}

/* Presidents */
.presidents-page {
  background:
    linear-gradient(180deg, rgba(12, 39, 88, 0.18), rgba(178, 34, 52, 0.1)),
    repeating-linear-gradient(
      180deg,
      rgba(178, 34, 52, 0.08) 0,
      rgba(178, 34, 52, 0.08) 24px,
      rgba(255, 255, 255, 0.64) 24px,
      rgba(255, 255, 255, 0.64) 48px
    ),
    #f8f8f8;
}

.presidents-page .site-header {
  background: rgba(252, 252, 252, 0.9);
}

.presidents-main {
  width: min(980px, 92vw);
  margin: 1.3rem auto 2.5rem;
}

.presidents-card {
  border: 1px solid #c6cfde;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f4f7fb);
  box-shadow: 0 16px 42px rgba(10, 29, 58, 0.12);
}

.presidents-head {
  position: relative;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid #d9e1ef;
  background:
    radial-gradient(circle at 0.5rem 0.5rem, rgba(12, 39, 88, 0.14) 0 2px, transparent 2px),
    radial-gradient(circle at 1.4rem 1.4rem, rgba(12, 39, 88, 0.14) 0 2px, transparent 2px),
    linear-gradient(90deg, rgba(12, 39, 88, 0.06), rgba(178, 34, 52, 0.08));
  background-size: 22px 22px, 22px 22px, auto;
}

.presidents-head h1 {
  margin: 0;
  color: #102e5a;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.presidents-head p {
  margin: 0.35rem 0 0;
  color: #304f7d;
}

.presidents-core {
  padding: 1rem;
}

.presidents-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.presidents-chip {
  border: 1px solid #d4ddec;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  background: #f8fbff;
  color: #1f4274;
  font-size: 0.87rem;
}

.presidents-question {
  margin: 0;
  font-size: 1.1rem;
  color: #122f58;
  font-weight: 700;
}

.presidents-subtext {
  margin: 0.35rem 0 0.9rem;
  color: #39577f;
}

.presidents-choices {
  display: grid;
  gap: 0.6rem;
}

.presidents-choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #d3dcec;
  border-radius: 0.75rem;
  background: #fdfefe;
  padding: 0.65rem;
}

.presidents-choice label {
  cursor: pointer;
  color: #122f58;
}

.presidents-controls {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.presidents-btn {
  border-radius: 0.65rem;
  border: 1px solid #bfd0e8;
  background: #ffffff;
  color: #13396d;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.presidents-btn--primary {
  border-color: #1c4f94;
  background: linear-gradient(135deg, #1c4f94, #143f79);
  color: #ffffff;
}

.presidents-result {
  margin-top: 0.85rem;
  border: 1px solid #d6deeb;
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.75rem;
  color: #143f79;
}

.presidents-result:empty {
  display: none;
}

.presidents-foot {
  border-top: 1px solid #d7dfec;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  color: #3d587c;
}

@media (max-width: 720px) {
  .shell,
  .page-main,
  .time-arena-main,
  .presidents-main {
    width: min(1120px, 95vw);
  }

  .site-header .shell {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.72rem 0;
    gap: 0.62rem;
  }

  .site-nav {
    width: 100%;
  }

  .nav-tabs {
    width: 100%;
    justify-content: flex-start;
    gap: 0.36rem;
  }

  .future-list {
    right: auto;
    left: 0;
  }

  .future-menu[open] .future-list {
    position: static;
    margin-top: 0.36rem;
    width: min(280px, 100%);
    box-shadow: 0 8px 22px rgba(8, 20, 36, 0.16);
  }

  .nav-link,
  .future-menu > summary {
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
  }

  .hub-hero {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .hub-hero h1 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .hub-hero-copy > p[data-featured-description] {
    font-size: 0.94rem;
  }

  .hub-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
  }

  .hub-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-lower-grid {
    grid-template-columns: 1fr;
  }

  .time-arena-candles {
    width: min(320px, 82%);
  }

  .time-arena-status,
  .presidents-status {
    align-items: flex-start;
  }

  .footer-content {
    font-size: 0.84rem;
  }
}

@media (max-width: 520px) {
  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .nav-link,
  .future-menu > summary {
    width: 100%;
    justify-content: center;
  }

  .hub-card-grid {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .hub-stats {
    grid-template-columns: 1fr;
  }

  .hub-hero-actions,
  .hub-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hub-btn {
    width: 100%;
  }
}
