:root {
  --canvas: #e7e9ed;
  --shell: #f6f7f9;
  --card: #ffffff;
  --ink: #171717;
  --muted: #6e737c;
  --line: #e6e7eb;
  --orange: #ff5b24;
  --orange-deep: #e44712;
  --orange-soft: #fff1ea;
  --black: #171717;
  --good: #178a45;
  --good-soft: #e8f6ee;
  --wait: #d14343;
  --wait-soft: #fdecec;
  --info: #9a4b12;
  --shadow: 0 10px 30px rgba(23, 23, 23, 0.05);
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Outfit", "Figtree", "Avenir Next", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, .num, .brand-name { font-family: var(--display); letter-spacing: -0.03em; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--black);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.stage { width: min(1120px, calc(100% - 32px)); margin: 20px auto 40px; }
.top, .auth-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img, .mark { width: 34px; height: 34px; }
.brand-name { font-size: 18px; }
.top nav { display: flex; gap: 18px; margin-left: 12px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.top-actions, .hero-actions, .row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.top-actions { margin-left: auto; }

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  background: var(--black);
  color: white;
}
.btn-orange { background: var(--orange); color: white; }
.btn-orange:hover { background: var(--orange-deep); }
.btn-ghost, button.btn-ghost {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: #cfcfd4; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; }
button.btn:focus-visible, a.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .rail a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5vw, 64px); line-height: 0.98; font-weight: 600; max-width: 11ch; }
.hero-copy p { margin-top: 16px; max-width: 42ch; color: #3c4048; font-size: 18px; }
.hero-actions { margin-top: 22px; }
.fine { margin-top: 14px; color: var(--muted); font-size: 14px; }

.browser {
  background: white;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.8);
  overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #f3f4f6; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d7d9de; display: block; }
.browser-bar span { margin-left: 8px; background: white; border-radius: 999px; padding: 4px 10px; color: var(--muted); font-size: 12px; }
.mini { padding: 16px; background: var(--shell); }
.mini-hello { font-family: var(--display); font-size: 22px; margin-bottom: 12px; }
.mini-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 10px; }
.metric, .panel, .poster, .auth-card, .limit, .table-card {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.metric { padding: 16px; min-height: 132px; position: relative; overflow: hidden; }
.metric .label, .panel .label, .limit .label { color: var(--muted); font-size: 14px; }
.metric .num { font-size: 40px; font-weight: 600; line-height: 1.1; margin: 8px 0; }
.metric .delta { color: var(--good); font-size: 14px; }
.metric.orange { background: var(--orange); color: white; border: 0; }
.metric.orange .label, .metric.orange .delta { color: rgba(255,255,255,0.86); }
.metric.orange::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #ff8a62;
  right: -36px;
  top: -48px;
}
.metric.orange > * { position: relative; z-index: 1; }
.float-cards { display: grid; grid-template-columns: 280px 320px; gap: 16px; margin-top: -42px; margin-left: 46%; position: relative; z-index: 2; }
.section { margin-top: 72px; }
.section h2 { font-size: 36px; line-height: 1.05; max-width: 16ch; }
.steps, .bento { display: grid; gap: 14px; margin-top: 22px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.bento { grid-template-columns: 1.2fr 1fr 1fr; }
.panel { padding: 20px; }
.panel h3 { font-size: 22px; margin-bottom: 8px; }
.panel p { color: #3c4048; }
.panel.orange { background: var(--orange); color: white; border: 0; }
.panel.orange p { color: rgba(255,255,255,0.9); }
.wide { grid-column: 1 / -1; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; color: var(--muted); font-size: 14px; }
.footer a { color: var(--ink); }

.shell {
  margin: 16px;
  min-height: calc(100vh - 32px);
  background: var(--shell);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 84px 1fr;
  box-shadow: 0 20px 50px rgba(20, 20, 20, 0.06);
}
.rail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0 18px;
}
.rail .mark { margin-bottom: 10px; }
.rail a {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #5d626b;
  text-decoration: none;
}
.rail a::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  translate: 0 -50%;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--black);
  color: white;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 6;
  box-shadow: 0 8px 20px rgba(23, 23, 23, 0.14);
}
.rail a:hover::after,
.rail a:focus-visible::after {
  opacity: 1;
}
.rail a svg { width: 20px; height: 20px; }
.rail a.is-on { background: var(--black); color: white; }
.rail a.bottom { margin-top: auto; }
.main { padding: 18px 22px 28px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.pills { display: flex; gap: 4px; background: #eceef2; border-radius: 999px; padding: 4px; }
.pills a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: #4d5158; font-size: 14px; }
.pills a.is-on { background: var(--black); color: white; }
.search { margin-left: auto; }
.search input, .field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 44px;
}
.search input { width: 220px; border-radius: 999px; padding-left: 16px; }
.account { position: relative; }
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.who[aria-expanded="true"] { border-color: #cfcfd4; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: white; display: grid; place-items: center; font-weight: 700; flex: none; }
.who-name { min-width: 0; }
.who small { display: block; color: var(--muted); font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-chevron { width: 16px; height: 16px; color: var(--muted); flex: none; }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 188px;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(23, 23, 23, 0.12);
  z-index: 8;
  display: grid;
  gap: 2px;
}
.account-menu[hidden] { display: none; }
.account-menu form { margin: 0; }
.account-sep {
  height: 1px;
  margin: 4px 8px;
  background: var(--line);
}
.account-menu a,
.account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-decoration: none;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.account-menu a svg,
.account-menu button svg { width: 18px; height: 18px; color: #5d626b; flex: none; }
.account-menu a:hover,
.account-menu button:hover { background: #f3f4f6; }
.account-menu a[aria-current="page"] { background: var(--black); color: white; }
.account-menu a[aria-current="page"] svg { color: white; }
.who:focus-visible, .account-menu a:focus-visible, .account-menu button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.banner {
  background: var(--orange-soft);
  color: #7a3414;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.hello h1 { font-size: 34px; font-weight: 600; }
.hello p { color: var(--muted); margin-top: 4px; }
.desk-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; margin-top: 18px; }
.stack, .side { display: grid; gap: 14px; align-content: start; }
.metrics { display: grid; grid-template-columns: 1.15fr 0.85fr 0.85fr; gap: 12px; }
.metric .num { font-size: 34px; }
.limit { padding: 16px 18px; }
.bar { height: 8px; background: #f0f1f4; border-radius: 99px; margin-top: 12px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.limit-top, .chart-top, .table-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.posters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.poster { padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; }
.poster.dark { background: var(--black); color: white; border: 0; }
.poster.orange { background: var(--orange); color: white; border: 0; }
.poster strong { font-family: var(--display); font-size: 20px; line-height: 1.2; }
.chart, .table-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.cols { height: 150px; display: flex; align-items: end; gap: 8px; margin-top: 16px; }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 6px; }
.col-bar { width: 100%; max-width: 28px; background: var(--orange); border-radius: 8px 8px 4px 4px; min-height: 4px; }
.col span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; }
td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: top; }
td a { text-decoration: none; font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 8px; background: #f3f4f6; font-size: 13px; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.wait { background: var(--wait-soft); color: var(--wait); }
.tag.info { background: var(--orange-soft); color: var(--info); }
.quiet { color: var(--muted); }
.empty { padding: 8px 0 4px; }
.list { display: grid; gap: 12px; }
.lead, .draft, .blog, .note, .post {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.lead { display: grid; grid-template-columns: 1.4fr 0.6fr auto; gap: 12px; text-decoration: none; align-items: center; }
.fit-num { font-family: var(--display); font-size: 28px; }
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 14px; }
.email-body, .note pre, .blog pre, textarea.email {
  white-space: pre-wrap;
  font-family: var(--sans);
  line-height: 1.55;
}
textarea.email { min-height: 280px; }
.facts { margin: 10px 0 0; padding-left: 18px; }
.facts li { margin: 4px 0; }
.form-grid { display: grid; gap: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.field .hint { color: var(--muted); font-size: 14px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: center; }
.auth-card { width: min(440px, 100%); margin: 8vh auto; padding: 28px; }
.auth-card h1 { font-size: 32px; margin-bottom: 8px; }
.auth-card form { display: grid; gap: 12px; margin-top: 18px; }
.error { color: var(--wait); }
.post-grid { display: grid; grid-template-columns: 180px 1fr; gap: 14px; }
.post img { width: 180px; height: 180px; border-radius: 16px; object-fit: cover; background: var(--orange); }
.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.wording { color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
  .hero, .desk-grid, .split, .steps, .bento, .metrics, .float-cards, .post-grid, .lead { grid-template-columns: 1fr; }
  .float-cards { margin-left: 0; margin-top: 16px; }
  .wide { grid-column: auto; }
  .top nav { display: none; }
}
@media (max-width: 800px) {
  .shell { margin: 0; border-radius: 0; min-height: 100vh; grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 64px;
    flex-direction: row;
    justify-content: space-around;
    background: white;
    border-top: 1px solid var(--line);
    z-index: 4;
    padding: 0;
  }
  .rail .mark, .rail a.bottom { display: none; }
  .rail a::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    translate: -50% 0;
  }
  .main { padding: 16px 14px 88px; }
  .pills, .search { display: none; }
  .who small { display: none; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
