/* ==========================================================================
   Macy Close Desk â€” theme.css
   Design thesis: Closing bell desk
   Theme CSS only â€” no inline style="" anywhere in layout or pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --night: #0B1F33;
  --night-deep: #071421;
  --night-lift: #12283F;
  --amber: #E8A838;
  --amber-soft: #F0C56A;
  --amber-dim: #B8842A;
  --cream: #F4EFE4;
  --cream-dim: #E8E0D2;
  --cream-deep: #DDD4C4;
  --ledger: #2F6F5E;
  --ledger-soft: #3D8A74;
  --ledger-mist: rgba(47, 111, 94, 0.12);
  --ink: #1A2A36;
  --ink-soft: #2C3E4C;
  --mute: #5A6B78;
  --line: rgba(11, 31, 51, 0.12);
  --line-on-night: rgba(244, 239, 228, 0.14);
  --glow-amber: rgba(232, 168, 56, 0.28);
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 28px rgba(7, 20, 33, 0.12);
  --shadow-card: 0 4px 18px rgba(7, 20, 33, 0.08);
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1120px;
  --rail: 280px;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.theme-close-desk {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(232, 168, 56, 0.08), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(47, 111, 94, 0.07), transparent 50%),
    var(--cream);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ledger);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--amber-dim);
}

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--night);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin: 0 0 0.55em;
}

h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  margin: 1.6em 0 0.5em;
}

h3 {
  font-size: 1.25rem;
  margin: 1.25em 0 0.4em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

li + li {
  margin-top: 0.35em;
}

code,
.mono,
.ticker,
.figure,
.metric-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Shell / chrome
   -------------------------------------------------------------------------- */
.desk-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.desk-chrome {
  background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  color: var(--cream);
  border-bottom: 1px solid var(--line-on-night);
  box-shadow: 0 8px 24px rgba(7, 20, 33, 0.22);
}

.desk-chrome a {
  color: var(--cream);
  text-decoration: none;
}

.desk-chrome a:hover,
.desk-chrome a:focus-visible {
  color: var(--amber-soft);
}

.desk-chrome-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.avatar-face {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.18);
  background: var(--night-lift);
}

.avatar-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-face-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--amber);
  background:
    radial-gradient(circle at 30% 25%, var(--night-lift), var(--night-deep));
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--cream);
}

.brand-tag {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--amber-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 0.92rem;
}

.desk-nav a {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.desk-nav a:hover,
.desk-nav a:focus-visible,
.desk-nav a.is-active {
  border-color: rgba(232, 168, 56, 0.45);
  background: rgba(232, 168, 56, 0.1);
}

.desk-nav .nav-hq {
  border-color: rgba(244, 239, 228, 0.22);
  color: var(--amber-soft);
}

.bell-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.4rem 1.25rem 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 228, 0.72);
  text-transform: uppercase;
}

.bell-strip .bell-live {
  color: var(--ledger-soft);
}

.bell-strip .bell-amber {
  color: var(--amber-soft);
}

/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */
.desk-page {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .desk-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  margin-bottom: 1.75rem;
  padding: 1.75rem 1.6rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(11, 31, 51, 0.96), rgba(18, 40, 63, 0.92)),
    var(--night);
  color: var(--cream);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-amber), transparent 70%);
  pointer-events: none;
}

.hero-kicker {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

.hero h1 {
  color: var(--cream);
  max-width: 16ch;
}

.hero-lede {
  max-width: 42rem;
  margin: 0 0 1.25rem;
  font-size: 1.12rem;
  color: rgba(244, 239, 228, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* --------------------------------------------------------------------------
   Buttons / chips
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-amber {
  background: var(--amber);
  color: var(--night-deep);
}

.btn-amber:hover,
.btn-amber:focus-visible {
  background: var(--amber-soft);
  color: var(--night-deep);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(244, 239, 228, 0.35);
  color: var(--cream);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--amber-soft);
  color: var(--amber-soft);
}

.btn-ink {
  background: var(--night);
  color: var(--cream);
}

.btn-ink:hover,
.btn-ink:focus-visible {
  background: var(--night-lift);
  color: var(--cream);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  background: var(--ledger-mist);
  color: var(--ledger);
  border: 1px solid rgba(47, 111, 94, 0.22);
}

.chip-amber {
  background: rgba(232, 168, 56, 0.16);
  color: var(--amber-dim);
  border-color: rgba(232, 168, 56, 0.35);
}

/* --------------------------------------------------------------------------
   Cards / panels
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.card {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-metric {
  border-top: 3px solid var(--amber);
}

.card-ledger {
  border-top: 3px solid var(--ledger);
}

.metric-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute);
}

.metric-value {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.55rem;
  color: var(--night);
  font-weight: 600;
}

.metric-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--mute);
}

.panel {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow-card);
}

.panel-night {
  background: var(--night);
  color: var(--cream);
  border-color: transparent;
}

.panel-night h2,
.panel-night h3 {
  color: var(--cream);
}

.panel-night a {
  color: var(--amber-soft);
}

.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent 80%);
  margin: 1.5rem 0;
}

.rule-ledger {
  background: linear-gradient(90deg, var(--ledger), transparent 80%);
}

/* --------------------------------------------------------------------------
   Aside rail
   -------------------------------------------------------------------------- */
.aside-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aside-card {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-card);
}

.aside-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.aside-card p,
.aside-card li {
  font-size: 0.92rem;
}

.ticker-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--cream-deep);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.ticker-row:last-child {
  border-bottom: 0;
}

.ticker-up {
  color: var(--ledger);
}

.ticker-flat {
  color: var(--mute);
}

.desk-note {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Services / lists
   -------------------------------------------------------------------------- */
.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.service-list li {
  margin: 0 0 0.85rem;
  padding: 1rem 1.1rem;
  background: #fffef9;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.service-list li.ledger-edge {
  border-left-color: var(--ledger);
}

.service-list h3 {
  margin: 0 0 0.35rem;
}

.service-list p {
  margin: 0;
  color: var(--ink-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
}

/* --------------------------------------------------------------------------
   About / avatar panel
   -------------------------------------------------------------------------- */
.avatar-panel {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 640px) {
  .avatar-panel {
    grid-template-columns: 1fr;
  }
}

.avatar-panel-frame {
  width: 160px;
  height: 160px;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid var(--amber);
  box-shadow: 0 0 0 6px rgba(232, 168, 56, 0.14);
  background: var(--night);
}

.avatar-panel-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-notes {
  font-size: 0.9rem;
  color: var(--mute);
  margin: 0.5rem 0 0;
}

.callout {
  border-left: 4px solid var(--ledger);
  padding: 0.85rem 1rem;
  background: var(--ledger-mist);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
}

.callout p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.desk-footer {
  margin-top: auto;
  background: var(--night-deep);
  color: rgba(244, 239, 228, 0.82);
  border-top: 1px solid var(--line-on-night);
}

.desk-footer a {
  color: var(--amber-soft);
  text-decoration: none;
}

.desk-footer a:hover,
.desk-footer a:focus-visible {
  color: var(--cream);
  text-decoration: underline;
}

.desk-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.75rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .desk-footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--cream);
  margin: 0 0 0.4rem;
}

.footer-joke {
  margin: 0;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(244, 239, 228, 0.72);
}

.footer-meta {
  margin: 0.85rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: rgba(244, 239, 228, 0.55);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.region-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  color: rgba(244, 239, 228, 0.7);
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.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;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.text-mute {
  color: var(--mute);
}

.text-ledger {
  color: var(--ledger);
}

.text-amber {
  color: var(--amber-dim);
}

.stack > * + * {
  margin-top: 0.85rem;
}