@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --paper: #f3f5f2;
  --ink: #17221e;
  --muted: #77817c;
  --line: #d9dfdb;
  --lime: #c4f278;
  --lime-dark: #a9db54;
  --red: #dc5a45;
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --sans: 'Manrope', 'Avenir Next', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
button, a { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.topbar { height: 76px; max-width: 1280px; margin: auto; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { text-decoration: none; font: 500 14px var(--mono); }
.wordmark i { margin: 0 4px; color: var(--red); font-style: normal; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.account { color: var(--muted); font-size: 12px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 1px solid transparent; border-radius: 3px; text-decoration: none; font-size: 12px; font-weight: 800; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button-dark { background: var(--ink); color: white; }
.button-lime { background: var(--lime); color: var(--ink); }
.button-lime:hover { background: var(--lime-dark); }
.button-outline { border-color: var(--line); background: transparent; color: var(--ink); }
.button-outline:hover { background: white; }
.button svg, .icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }

main { max-width: 1196px; margin: 0 auto; padding: 0 0 72px; }
.hero { min-height: 360px; margin: 0 42px; padding: 65px 0 54px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); animation: enter .55s ease both; }
.eyebrow, .section-kicker, .metric-label, .video-header, footer { font: 10px var(--mono); }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-dark); box-shadow: 0 0 0 3px rgb(169 219 84 / 20%); }
.pulse.offline { background: var(--red); box-shadow: 0 0 0 3px rgb(220 90 69 / 14%); }
h1 { margin: 25px 0 15px; font-size: clamp(46px, 6vw, 76px); line-height: .99; font-weight: 700; }
h1 em { color: #74837b; font-family: Georgia, serif; font-weight: 400; }
.hero-note { margin: 0; color: var(--muted); font-size: 13px; }
.hero-mark { width: 148px; height: 148px; flex: 0 0 148px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #bcc8c0; border-radius: 50%; transform: rotate(-9deg); }
.hero-mark span { font: 58px/.9 Georgia, serif; }
.hero-mark small { margin-top: 8px; color: var(--muted); font: 9px var(--mono); }
.hero-mark b { position: absolute; right: -2px; bottom: 11px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: 16px; font-weight: 500; }
.setup, .connect-panel { margin: 36px 42px 0; padding: 27px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--ink); color: white; animation: enter .45s ease both; }
.setup { justify-content: flex-start; }
.setup-index { color: var(--lime); font: 12px var(--mono); }
.setup h2, .connect-panel h2, .playlist-bar h2 { margin: 7px 0 5px; font-size: 19px; }
.setup p, .connect-copy p { max-width: 530px; margin: 0; color: #aab5af; font-size: 12px; line-height: 1.7; }
.connect-copy .section-kicker { color: var(--lime); }
.connect-panel { min-height: 150px; }
.connect-panel .button { flex-shrink: 0; }
.dashboard { margin: 0 42px; animation: enter .45s ease both; }
.metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--line); }
.metric { min-height: 139px; padding: 25px 24px 20px 0; display: flex; flex-direction: column; align-items: flex-start; border-right: 1px solid var(--line); }
.metric + .metric { padding-left: 24px; }
.metric:last-child { border: 0; }
.metric-label { color: var(--muted); }
.metric strong { margin-top: 12px; font: 44px/.95 Georgia, serif; }
.metric .metric-time { font-size: 26px; }
.metric-caption { margin-top: 7px; color: var(--muted); font-size: 11px; }
.metric-action { justify-content: flex-start; }
.metric-action .button { margin-top: 13px; }
.playlist-bar { min-height: 112px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.playlist-bar h2 { max-width: 650px; overflow-wrap: anywhere; }
.section-kicker { color: var(--muted); }
.text-link { flex-shrink: 0; color: #405e42; font-size: 11px; font-weight: 800; text-decoration: none; }
.text-link span { margin-left: 5px; color: var(--red); }
.video-header { display: flex; justify-content: space-between; padding: 19px 0 12px; color: var(--muted); }
.video-header span:last-child { min-width: 116px; text-align: right; }
.video-list { border-top: 1px solid var(--line); }
.video-row { min-height: 91px; display: grid; grid-template-columns: 105px 1fr 120px; align-items: center; gap: 17px; border-bottom: 1px solid var(--line); }
.video-thumb { width: 105px; height: 60px; object-fit: cover; background: #dfe5e1; }
.video-title { display: block; max-width: 640px; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.video-date { display: block; margin-top: 5px; color: var(--muted); font: 10px var(--mono); }
.video-expiry { color: #69756e; font: 11px var(--mono); text-align: right; }
.empty-state { padding: 58px 12px; text-align: center; border-top: 1px solid var(--line); }
.empty-symbol { color: #92a097; font: 36px Georgia, serif; }
.empty-state p { margin: 10px 0 5px; font-size: 14px; font-weight: 700; }
.empty-state small { color: var(--muted); font-size: 11px; }
.error-note { margin: 14px 0 0; padding: 12px 14px; border-left: 2px solid var(--red); color: #a44334; background: #f7eae7; font-size: 12px; }
footer { max-width: 1196px; margin: 0 auto; padding: 17px 42px 24px; display: flex; justify-content: space-between; color: var(--muted); }
footer b { padding: 0 5px; color: var(--red); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 700px) {
  .topbar { height: 64px; padding: 0 20px; }
  main { padding-bottom: 45px; }
  .hero { min-height: 292px; margin: 0 20px; padding: 48px 0 40px; }
  h1 { font-size: 50px; }
  .hero-note { max-width: 260px; font-size: 12px; line-height: 1.6; }
  .hero-mark { width: 88px; height: 88px; flex-basis: 88px; }
  .hero-mark span { font-size: 38px; }
  .hero-mark small { margin-top: 4px; font-size: 7px; }
  .hero-mark b { right: -5px; bottom: 2px; width: 24px; height: 24px; }
  .setup, .connect-panel { margin: 24px 20px 0; padding: 22px; }
  .connect-panel { align-items: flex-start; flex-direction: column; }
  .dashboard { margin: 0 20px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 122px; padding-top: 22px; }
  .metric + .metric { padding-left: 16px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3) { grid-column: 1 / -1; min-height: 95px; padding-left: 0; border-top: 1px solid var(--line); }
  .metric strong { font-size: 39px; }
  .metric .metric-time { font-size: 23px; }
  .playlist-bar { min-height: 105px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 11px; padding: 17px 0; }
  .playlist-bar h2 { font-size: 16px; }
  .video-row { min-height: 80px; grid-template-columns: 83px minmax(0, 1fr) 68px; gap: 10px; }
  .video-thumb { width: 83px; height: 49px; }
  .video-title { font-size: 11px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .video-date, .video-expiry { font-size: 9px; }
  .video-header span:last-child { min-width: 68px; }
  footer { padding: 15px 20px 22px; gap: 20px; font-size: 9px; }
}
@media (max-width: 390px) {
  .account { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  h1 { font-size: 44px; }
  .hero-mark { width: 74px; height: 74px; flex-basis: 74px; }
  .hero-mark span { font-size: 32px; }
  footer { font-size: 8px; }
}