:root {
  --shell-ink: #20231f;
  --shell-muted: #686d66;
  --shell-line: #d1d5ce;
  --shell-paper: #f3f5f1;
  --shell-surface: #fbfcf8;
  --shell-accent: #14766d;
  --shell-accent-soft: #e1eee9;
  --shell-warning: #b44b27;
  --shell-sans: "Avenir Next", "Noto Sans SC", "PingFang SC", sans-serif;
  --shell-mono: "SFMono-Regular", "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--shell-ink); background: var(--shell-paper); font-family: var(--shell-sans); }
button, input, select, textarea { font: inherit; }
button, input, select { color: inherit; }
a { color: inherit; }

.signed-out-body { display: grid; min-height: 100dvh; place-items: center; padding: 24px; }
.signed-out-card {
  width: min(100%, 520px); padding: clamp(30px, 6vw, 58px);
  border: 1px solid var(--shell-line); border-top: 4px solid var(--shell-accent); background: var(--shell-surface);
}
.signed-out-card h1 { margin: 8px 0 12px; font-size: clamp(34px, 7vw, 54px); letter-spacing: -.05em; }
.signed-out-card > p:not(.section-label) { margin: 0 0 28px; color: var(--shell-muted); line-height: 1.7; }
.signed-out-card > a {
  display: inline-flex; min-height: 44px; align-items: center; padding: 0 18px;
  color: white; background: var(--shell-accent); font-size: 13px; font-weight: 750; text-decoration: none;
}
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--shell-accent) 45%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 14px;
  color: white; background: var(--shell-ink); transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.page-grain { display: none; }

.app-header,
.product-nav {
  width: min(1480px, calc(100% - 48px));
  margin-inline: auto;
}
.app-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding: 30px 0 23px; border-bottom: 2px solid var(--shell-ink);
}
.app-header__identity { min-width: 0; }
.app-header__home,
.app-header__kicker,
.section-label {
  margin: 0; color: var(--shell-muted); font: 700 11px/1.4 var(--shell-mono);
  letter-spacing: .12em; text-decoration: none;
}
.app-header__home:hover { color: var(--shell-accent); }
.app-header__kicker { margin-top: 18px; }
.app-header h1 {
  margin: 3px 0 0; font: 720 clamp(32px, 5vw, 58px)/.95 var(--shell-sans);
  letter-spacing: -.055em;
}
.app-header__description { max-width: 760px; margin: 12px 0 0; color: var(--shell-muted); font-size: 13px; }
.app-header__utilities { display: flex; align-items: stretch; gap: 10px; }
.status-stamp,
.user-chip {
  padding: 10px 14px; border: 1px solid var(--shell-line); background: var(--shell-surface); font-size: 12px;
}
.status-stamp span, .status-stamp strong { display: block; }
.status-stamp span { color: var(--shell-muted); font-size: 10px; letter-spacing: .08em; }
.status-stamp strong { margin-top: 3px; }
.user-chip a { font-weight: 750; }

.user-menu { position: relative; min-width: 150px; }
.user-menu__trigger {
  display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 16px;
  margin: -4px -6px; padding: 4px 6px; cursor: pointer; list-style: none;
}
.user-menu__trigger::-webkit-details-marker { display: none; }
.user-menu__identity { display: grid; gap: 2px; min-width: 0; }
.user-menu__identity strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__identity small { color: var(--shell-muted); font: 700 9px/1.2 var(--shell-mono); letter-spacing: .08em; }
.user-menu__chevron { color: var(--shell-muted); font-size: 15px; transition: transform 140ms ease; }
.user-menu[open] .user-menu__chevron { transform: rotate(180deg); }
.user-menu__panel {
  position: absolute; top: calc(100% + 11px); right: -7px; z-index: 120;
  width: max-content; min-width: 170px; padding: 7px;
  border: 1px solid var(--shell-line); background: var(--shell-surface);
  box-shadow: 0 14px 34px rgba(32, 35, 31, .14);
}
.user-menu__panel button,
.user-menu__panel a {
  display: block;
  width: 100%; padding: 9px 10px; border: 0; color: var(--shell-warning);
  background: transparent; text-align: left; text-decoration: none; cursor: pointer;
}
.user-menu__panel a { color: var(--shell-ink); }
.user-menu__panel button:hover,
.user-menu__panel a:hover { background: color-mix(in srgb, var(--shell-accent) 8%, transparent); }
.user-menu__panel button:disabled { cursor: wait; opacity: .58; }
.user-menu__status { margin: 5px 10px 4px; color: var(--shell-warning); font-size: 10px; line-height: 1.4; }

.product-nav { border-bottom: 1px solid var(--shell-line); }
.product-nav__rail { display: flex; width: 100%; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.product-nav__rail > * { flex: 0 0 auto; }
.product-nav a,
.product-nav__planned {
  position: relative; display: inline-flex; min-height: 48px; align-items: center; gap: 7px;
  padding: 0 15px; color: var(--shell-muted); font-size: 12px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.product-nav a:hover { color: var(--shell-ink); background: rgba(255,255,255,.55); }
.product-nav a[aria-current="page"] { color: var(--shell-accent); }
.product-nav a[aria-current="page"]::after {
  position: absolute; right: 15px; bottom: -1px; left: 15px; height: 2px; background: currentColor; content: "";
}
.product-nav__planned { cursor: not-allowed; opacity: .52; }
.product-nav__planned small { padding: 2px 4px; border: 1px solid currentColor; font-size: 9px; letter-spacing: .04em; }

@media (max-width: 760px) {
  .app-header, .product-nav { width: min(100% - 28px, 1480px); }
  .app-header { align-items: flex-start; flex-direction: column; }
  .app-header__utilities { width: 100%; }
  .status-stamp, .user-chip { flex: 1; }
  .user-menu__panel { right: auto; left: -7px; }
}
