
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --display: var(--font-display);
  --heading: var(--font-heading);
  --body-font: var(--font-body);
  --label-font: var(--font-label);
  --caption-font: var(--font-caption);
  --ivory: #f7f1e6;
  --ivory-deep: #efe4d1;
  --paper: #fffaf0;
  --paper-warm: #fbf4e6;
  --paper-sage: #e5eadf;
  --ink: #102721;
  --ink-navy: #102940;
  --muted: #6a655c;
  --line: #d8cdbd;
  --line-strong: #b7aa98;
  --sage: #6f8469;
  --sage-dark: #3f6049;
  --plum: #6f2d61;
  --plum-dark: #55224e;
  --plum-soft: #eee1ea;
  --ochre: #ad7b2f;
  --rust: #a64b35;
  --state-success: #3b7a5d;
  --state-success-50: #eef6f1;
  --state-warning: #ad7b2f;
  --state-warning-50: #fbf0dc;
  --state-error: #a84840;
  --state-error-50: #f6e3df;
  --state-info: #335f8c;
  --state-info-50: #edf3f7;
  --cea-primary-950: var(--ink);
  --cea-primary-900: var(--ink-navy);
  --cea-primary-800: #173a32;
  --cea-primary-700: var(--plum);
  --cea-primary-600: var(--plum);
  --cea-primary-500: var(--plum);
  --cea-primary-300: #b895ae;
  --cea-primary-100: var(--plum-soft);
  --cea-neutral-50: var(--ivory);
  --cea-neutral-100: var(--paper-warm);
  --cea-neutral-200: var(--line);
  --cea-neutral-600: var(--muted);
  --cea-neutral-700: #3f3a33;
  --cea-border: var(--line);
  --cea-input: var(--line-strong);
  --cea-card: var(--paper);
  --cea-foreground: var(--ink);
  --cea-muted-foreground: var(--muted);
  --cea-secondary-foreground: #302b25;
  --cea-radius-small: 9px;
  --cea-radius-medium: 16px;
  --cea-radius-large: 28px;
  --cea-paper-shadow: 0 24px 60px rgba(40, 34, 25, .12);
  --cea-paper-shadow-soft: 0 12px 28px rgba(40, 34, 25, .08);
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(rgba(16, 39, 33, .055) .7px, transparent .7px),
    linear-gradient(120deg, rgba(111, 45, 97, .04), transparent 34%),
    var(--ivory);
  background-size: 7px 7px, auto, auto;
  color: var(--ink);
  font-family: var(--body-font);
  font-size: var(--type-body);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading); }
button, input, select, textarea { font-family: var(--body-font); font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.shell {
  max-width: 1480px;
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(247, 241, 230, .96);
  border-inline: 1px solid rgba(216, 205, 189, .7);
  overflow-x: clip;
}

.topbar {
  min-height: 78px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 241, 230, .88);
  border-bottom: 1px solid rgba(216, 205, 189, .72);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--plum);
  box-shadow: 5px 5px 0 rgba(111, 45, 97, .14);
  transform: rotate(-2deg);
  font: 700 19px/1 var(--display);
}

.brand-mark::before { content: "M"; }

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.9vw, 24px);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav a, .nav-login, .nav-user, .nav-logout {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.nav a:hover, .nav .active, .nav-logout:hover { color: var(--ink); }
.nav .active { border-bottom-color: var(--plum); font-weight: 700; }
.nav-user { color: var(--sage-dark); font-size: var(--type-caption); font-weight: 700; }
.nav-logout { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: var(--type-caption); }
.nav-user[hidden], .nav-logout[hidden], .nav-login[hidden] { display: none; }
.nav-upcoming { color: var(--muted); }
.nav-upcoming small { margin-left: 5px; color: var(--plum); font: 500 10px var(--caption-font); }

.nav-action {
  min-height: 40px !important;
  padding: 0 16px;
  border: 1px solid var(--plum) !important;
  border-radius: 999px;
  background: var(--plum);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(111, 45, 97, .16);
}

.lang-toggle { display: none; }
.eyebrow {
  font: 500 11px/1.4 var(--label-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage-dark);
}
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.035em; color: var(--ink); }
.helper { color: var(--muted); font-size: 14px; line-height: 1.6; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, border-color .22s ease;
}

.button:hover { transform: translateY(-2px); box-shadow: var(--cea-paper-shadow-soft); }
.button.primary { background: var(--plum); border-color: var(--plum); color: #fff; }
.button.primary:hover { background: var(--plum-dark); border-color: var(--plum-dark); }
.button.secondary { background: rgba(255, 250, 240, .66); }
.button.secondary:hover { background: var(--paper); }
.button.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.button:focus-visible, .text-button:focus-visible, .mode-button:focus-visible, .task-row:focus-visible, .tab:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(111, 45, 97, .28);
  outline-offset: 3px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: 500 10px var(--caption-font);
  letter-spacing: .08em;
  white-space: nowrap;
}
.supported { color: var(--state-success); background: var(--state-success-50); }
.partially { color: var(--state-warning); background: var(--state-warning-50); }
.unsupported { color: var(--state-error); background: var(--state-error-50); }
.unverified { color: var(--state-info); background: var(--state-info-50); }

.demo-banner {
  margin: 0 clamp(20px, 5vw, 72px);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: baseline;
  background: #efe6d6;
  border: 1px solid #d7c3a6;
  border-top: 0;
  color: #3f3528;
}
.demo-banner[hidden] { display: none; }
.demo-banner b { color: var(--plum); font-family: var(--heading); font-size: 19px; }
.demo-banner span { font-size: 14px; }
.demo-banner small { grid-column: 2; color: var(--muted); font: 500 10px var(--caption-font); letter-spacing: .06em; }

.alpha-banner b { color: var(--ink-navy); }

.text-button {
  border: 0;
  background: transparent;
  color: var(--plum);
  padding: 0;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fade-in { animation: editorial-rise .62s ease both; }
@keyframes editorial-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 920px) {
  .topbar { align-items: flex-start; padding-block: 14px; flex-direction: column; }
  .nav { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .nav a, .nav-login, .nav-user, .nav-logout { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .shell { border-inline: 0; }
  .topbar { min-height: auto; }
  .brand { font-size: 16px; }
  .brand-mark { width: 28px; height: 32px; font-size: 17px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav-action { padding-inline: 14px; }
  .demo-banner { margin-inline: 16px; grid-template-columns: 1fr; }
  .demo-banner small { grid-column: 1; }
  .button { width: 100%; }
  .button.small { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
