/* FrontDesk JA — Publishing Center. Visual language from the approved reference:
   white/pearl glass, black type, wide-tracked caps labels, black pill CTAs. */
:root {
  --bg: #fbfbfc;
  --bg-2: #f2f2f4;
  --ink: #0a0a0a;
  --ink-2: #3a3a3c;
  --ink-3: #6e6e73;
  --ink-4: #a1a1a6;
  --line: rgba(10, 10, 10, 0.08);
  --line-2: rgba(10, 10, 10, 0.14);
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-edge: rgba(255, 255, 255, 0.95);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 24px 60px -36px rgba(20, 20, 30, 0.35), 0 2px 6px -2px rgba(20, 20, 30, 0.06);
  --radius: 22px;
  --radius-sm: 14px;
  --ok: #1f7a3d;
  --warn: #a15c00;
  --bad: #b42318;
  --info: #1d4ed8;
  /* Accent: PANTONE 13-0663 TSX Sun Glare — only shown while something is being pressed. */
  --accent: #edff00;
  --display: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5.4vw, 92px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-2); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 85% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(900px 600px at -10% 110%, #ececef 0%, rgba(236, 236, 239, 0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter) 0;
}
.brand { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 40px); text-decoration: none; min-width: 0; }
.brand img { height: clamp(46px, 5.6vw, 92px); width: auto; }
.brand .divider { width: 1.5px; align-self: stretch; margin: 10px 0; background: var(--ink); opacity: 0.75; }
.brand .product {
  font-size: clamp(10px, 1.05vw, 17px);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.menu-btn {
  width: 52px; height: 44px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-content: center; gap: 9px; padding: 0;
}
.menu-btn span { display: block; width: 38px; height: 2px; background: var(--ink); border-radius: 2px; }

.subnav {
  display: flex; gap: 28px; padding: 18px var(--gutter) 0; overflow-x: auto; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  font-size: 11.5px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-3);
  text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; white-space: nowrap;
}
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current='page'] { color: var(--ink); border-color: var(--ink); }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(250, 250, 252, 0.5); backdrop-filter: blur(6px); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 41;
  background: var(--glass-strong); backdrop-filter: blur(28px) saturate(1.2);
  border-left: 1px solid var(--line); box-shadow: -30px 0 80px -40px rgba(0, 0, 0, 0.3);
  padding: 28px 32px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
}
.drawer .close { align-self: flex-end; }
.drawer nav a {
  display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0;
  font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.03em;
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.drawer nav a small { font-family: var(--text); font-weight: 400; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3); }
.drawer nav a[aria-current='page'] { color: var(--ink); }
.drawer nav a:not([aria-current='page']) { color: var(--ink-2); }
.drawer .who { margin-top: auto; padding-top: 24px; font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------------- layout */
main { padding: 0 var(--gutter) 80px; position: relative; z-index: 1; }
.eyebrow { font-size: clamp(11px, 1vw, 15px); letter-spacing: 0.45em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 18px; }
h1, .h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.032em; line-height: 1.0; margin: 0;
  font-size: clamp(40px, 6.2vw, 92px);
}
h2 { font-family: var(--display); font-weight: 650; letter-spacing: -0.03em; font-size: clamp(22px, 2.2vw, 30px); margin: 0 0 14px; line-height: 1.1; }
h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 19px; margin: 0 0 8px; }
.lede { font-size: clamp(17px, 1.6vw, 25px); color: var(--ink-2); line-height: 1.35; margin: 22px 0 0; max-width: 40ch; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.page-head { padding: clamp(36px, 6vw, 84px) 0 clamp(26px, 3.5vw, 44px); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head .h1 { font-size: clamp(38px, 5vw, 72px); }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.card {
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid var(--glass-edge); outline: 1px solid var(--line); outline-offset: -1px;
  border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2vw, 28px); min-width: 0;
}
.card.flat { box-shadow: none; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h2 { margin: 0; }
.label { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-3); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--glass-strong); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #fff; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #222; }
.btn.lg { height: clamp(54px, 4.4vw, 70px); padding: 0 clamp(26px, 2.8vw, 44px); font-size: clamp(16px, 1.35vw, 22px); font-weight: 400; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn .arrow { width: 26px; height: 14px; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); cursor: pointer; display: grid; place-items: center; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.field .hint { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0; text-transform: none; }
input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='search'], input[type='datetime-local'], input[type='time'], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.85); outline: none;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.07); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.counter { font-size: 12px; color: var(--ink-3); text-align: right; }
.counter.over { color: var(--bad); }

/* ---------------------------------------------------------------- status + chips */
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line); white-space: nowrap;
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.chip.s-awaiting_approval::before { background: #d89b00; }
.chip.s-approved::before, .chip.s-scheduled::before { background: var(--ink); }
.chip.s-publishing::before { background: var(--info); }
.chip.s-published::before { background: var(--ok); }
.chip.s-failed::before { background: var(--bad); }
.chip.s-manual_action_required::before { background: #e46b00; }
.chip.s-cancelled { color: var(--ink-3); text-decoration: line-through; }
.chip.plain::before { display: none; }
.chip.reported { border-style: dashed; }

.tile {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 244, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.95); outline: 1px solid var(--line); outline-offset: -1px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.35);
}
.tile svg { width: 24px; height: 24px; }
.tile.sm { width: 32px; height: 32px; border-radius: 9px; }
.tile.sm svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); min-width: 0; text-decoration: none; }
.list-item:first-child { border-top: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.list-item:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 18px 0 6px; color: var(--ink-3); font-size: 14.5px; }

.notice { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.75); }
.notice.warn { border-color: rgba(161, 92, 0, 0.3); background: rgba(255, 246, 230, 0.8); }
.notice.bad { border-color: rgba(180, 35, 24, 0.3); background: rgba(254, 240, 238, 0.85); }
.notice.ok { border-color: rgba(31, 122, 61, 0.3); background: rgba(236, 250, 241, 0.85); }
.notice ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------------------------------------------------------------- landing */
.landing { position: relative; min-height: calc(100vh - 140px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 2vw; }
.landing .copy { position: relative; z-index: 2; padding: 4vh 0 8vh; }
.landing .art { position: relative; align-self: stretch; }
.landing .art img {
  position: absolute; right: calc(-1 * var(--gutter)); top: -14%; height: 118%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 8%, #000 40%), linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 8%, #000 40%), linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.login-card { margin-top: 34px; max-width: 460px; }
.overview-hero { position: relative; padding: clamp(40px, 7vw, 110px) 0 clamp(36px, 5vw, 70px); min-height: clamp(420px, 38vw, 640px); }
.overview-hero > :not(.hero-art-bg) { position: relative; z-index: 1; }
.hero-art-bg { position: absolute; z-index: 0; right: calc(-1 * var(--gutter)); top: -60px; bottom: -40px; width: min(58vw, 1000px); pointer-events: none; }
.hero-art-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%), linear-gradient(180deg, transparent 0%, #000 12%, #000 75%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%), linear-gradient(180deg, transparent 0%, #000 12%, #000 75%, transparent 100%);
  mask-composite: intersect;
}

/* ---------------------------------------------------------------- media */
.media-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.media-card { padding: 10px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; }
.media-card[aria-pressed='true'] { outline: 2px solid var(--ink); }
.thumb { aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #f6f6f8, #e9e9ee); display: grid; place-items: center; position: relative; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge { position: absolute; left: 8px; bottom: 8px; }
.preview-video { width: 100%; max-height: 60vh; border-radius: 16px; background: #000; }
.preview-img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 16px; background: #f2f2f4; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); width: 0; transition: width 0.2s linear; }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 26px; text-align: center; background: rgba(255, 255, 255, 0.5); }
.dropzone.over { border-color: var(--ink); background: #fff; }

/* ---------------------------------------------------------------- compose */
.variant-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.variant-tab { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); cursor: pointer; white-space: nowrap; }
.variant-tab[aria-selected='true'] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.two-col { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.phone-preview { border-radius: 26px; background: #0b0b0c; color: #fff; padding: 12px; max-width: 320px; margin: 0 auto; }
.phone-preview .screen { border-radius: 18px; overflow: hidden; background: #1a1a1c; aspect-ratio: 9 / 16; display: grid; place-items: center; }
.phone-preview .screen.landscape { aspect-ratio: 16 / 9; }
.phone-preview .screen.square { aspect-ratio: 4 / 5; }
.phone-preview .screen img, .phone-preview .screen video { width: 100%; height: 100%; object-fit: cover; }
.phone-preview .cap { padding: 10px 4px 2px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; }
.copy-block { position: relative; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.sticky-actions { padding-top: 4px; }

/* ---------------------------------------------------------------- calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-3); padding: 4px 6px; }
.cal .day { min-height: 128px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cal .day.out { opacity: 0.45; }
.cal .day.today { border-color: var(--ink); }
.cal .day .num { font-family: var(--display); font-weight: 600; font-size: 15px; }
.cal .day.sunday .num::after { content: ' · rest'; font-family: var(--text); font-weight: 400; font-size: 11px; color: var(--ink-4); }
.entry { display: block; font-size: 12px; line-height: 1.25; padding: 5px 7px; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry.slot { background: transparent; border-style: dashed; color: var(--ink-3); cursor: pointer; text-align: left; width: 100%; }
.entry.slot:hover { color: var(--ink); border-color: var(--ink); }
.entry.st-published { background: rgba(236, 250, 241, 0.95); }
.entry.st-failed, .entry.st-manual_action_required { background: rgba(255, 243, 233, 0.95); }
.entry.st-scheduled { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); padding: 10px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- modal + toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(245, 245, 248, 0.6); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--glass-strong); }
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5); }
.toast.bad { background: var(--bad); }

.loading { padding: 60px 0; color: var(--ink-3); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .landing { grid-template-columns: 1fr; min-height: auto; }
  .landing .art { order: -1; height: 46vw; min-height: 220px; margin: 0 calc(-1 * var(--gutter)); }
  .landing .art img { position: static; height: 100%; width: 100%; object-fit: cover; object-position: 40% 50%; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
  .landing .copy { padding-top: 0; }
  .two-col { grid-template-columns: 1fr; }
  .hero-art-bg { width: 100vw; top: -20px; bottom: auto; height: 70%; opacity: 0.35; }
  .overview-hero { min-height: 0; }
  .subnav { display: none; }
}
@media (max-width: 720px) {
  .site-header { padding-top: 14px; }
  .brand { gap: 12px; }
  .brand .product { letter-spacing: 0.24em; font-size: 9.5px; }
  .menu-btn { width: 44px; }
  .menu-btn span { width: 30px; }
  .cal { grid-template-columns: 1fr; }
  .cal .dow { display: none; }
  .cal .day { min-height: 0; }
  .cal .day.out { display: none; }
  .cal .day .num::before { content: attr(data-dow) ' '; font-weight: 400; color: var(--ink-3); font-size: 13px; }
  .btn.lg { width: 100%; }
  .page-head { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Press feedback: Sun Glare appears only while a control is pressed. */
.btn, .icon-btn, .menu-btn, .variant-tab, .media-card, a.list-item, .entry, .subnav a, .drawer nav a { transition: background-color 0.12s, border-color 0.12s, color 0.12s; }
.btn:active:not(:disabled), .btn.primary:active:not(:disabled), .icon-btn:active, .variant-tab:active, .entry:active {
  background: var(--accent); border-color: var(--accent); color: #0a0a0a;
}
.menu-btn:active { background: var(--accent); border-radius: 999px; }
.media-card:active, a.list-item:active, .drawer nav a:active { background: var(--accent); }
a.list-item:active { border-radius: 10px; }
.subnav a:active { color: #0a0a0a; border-color: var(--accent); }
