:root {
  --bg: #eef1f4;
  --bg-elev: #ffffff;
  --ink: #15202b;
  --muted: #5b6b7c;
  --line: #d5dde6;
  --accent: #0b6e6a;
  --accent-ink: #063f3d;
  --tag: #e4eef0;
  --shadow: 0 10px 30px rgba(21, 32, 43, 0.06);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 42% at 18% -8%, rgba(11, 110, 106, 0.09), transparent 72%),
    radial-gradient(ellipse 55% 36% at 92% 0%, rgba(21, 32, 43, 0.045), transparent 70%),
    linear-gradient(180deg, #e9eef2 0%, var(--bg) 42%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.45;
}

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.page {
  flex: 1 0 auto;
  padding: 1.5rem 0 2rem;
}

.top {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(21, 32, 43, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.7rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 14px rgba(5, 59, 57, 0.22);
}

.menu-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.account-menu {
  position: relative;
}

.account-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.account-toggle:hover,
.account-toggle[aria-expanded="true"] {
  border-color: rgba(11, 110, 106, 0.4);
  color: var(--accent-ink);
  background: #e4eef0;
}

.account-toggle.is-signed-in {
  border-color: rgba(11, 110, 106, 0.45);
  color: var(--accent-ink);
}

.account-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 55;
  min-width: 12.5rem;
  padding: 0.45rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(21, 32, 43, 0.16);
  display: grid;
  gap: 0.15rem;
}

.account-panel[hidden] {
  display: none !important;
}

.account-panel-email {
  margin: 0;
  padding: 0.45rem 0.7rem 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  word-break: break-all;
}

.account-panel a,
.account-panel button {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.account-panel a:hover,
.account-panel button:hover {
  background: rgba(11, 110, 106, 0.08);
  color: var(--accent-ink);
}

.account-panel .btn-danger-link,
.account-panel button.btn-danger-link {
  color: #8a1f1a;
}

.account-panel .btn-danger-link:hover,
.account-panel button.btn-danger-link:hover {
  background: #fdeceb;
  color: #6e1511;
}

.account-panel .btn-logout-link,
.account-panel button.btn-logout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
}

.account-panel .btn-logout-link:hover,
.account-panel button.btn-logout-link:hover {
  background: rgba(11, 110, 106, 0.08);
  color: var(--accent-ink);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.menu-toggle:hover {
  border-color: rgba(11, 110, 106, 0.35);
  color: var(--accent-ink);
}

.menu-toggle[aria-expanded="true"] {
  border-color: rgba(11, 110, 106, 0.4);
  background: #e4eef0;
}

.menu-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 1.05rem;
}

.menu-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(21, 32, 43, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.feed-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(20rem, calc(100vw - 2rem));
  height: 100vh;
  height: 100dvh;
  background: var(--bg-elev);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(21, 32, 43, 0.14);
  padding: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
}

.feed-menu[hidden],
.menu-backdrop[hidden] {
  display: none !important;
}

.feed-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 1.1rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.menu-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  border-radius: 8px;
}

.menu-close:hover {
  color: var(--ink);
  background: rgba(21, 32, 43, 0.06);
}

.feed-menu-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0 0 max(1.25rem, env(safe-area-inset-bottom, 0px));
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.feed-menu-link {
  display: block;
  padding: 0.85rem 1.15rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-left: 3px solid transparent;
}

.feed-menu-link:hover {
  background: rgba(11, 110, 106, 0.07);
  color: var(--accent-ink);
}

.feed-menu-link.is-active {
  background: #e4eef0;
  color: var(--accent-ink);
  border-left-color: var(--accent);
}

body.menu-open {
  overflow: hidden;
}

.hero-line h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.1;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.hero-line p {
  margin: 0 0 1.4rem;
  color: var(--muted);
}

.filters-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.filters-dock {
  position: sticky;
  top: 4.4rem;
  z-index: 15;
  margin: 0 0 1rem;
  padding: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, padding 0.2s ease;
}

.filters-dock.is-stuck {
  margin-bottom: 1rem;
  padding: 0.65rem 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(21, 32, 43, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filters-dock.is-stuck .filters {
  box-shadow: none;
  border-color: rgba(213, 221, 230, 0.9);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow);
  margin: 0;
}

.field {
  display: grid;
  gap: 0.3rem;
  min-width: 10rem;
}

.field.grow { flex: 1 1 16rem; }

.field > span:first-child {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.field input,
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 0.85rem;
  font: inherit;
  line-height: 1.2;
  background: #f8fafb;
  color: var(--ink);
  width: 100%;
}

.select-wrap {
  position: relative;
  display: block;
  height: 2.75rem;
}

.select-wrap select {
  padding-right: 2.4rem;
  cursor: pointer;
  height: 100%;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.9rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.select-wrap:focus-within::after {
  border-color: var(--accent);
  transform: translateY(-20%) rotate(225deg);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(11, 110, 106, 0.35);
  border-color: var(--accent);
}

.suggest-wrap {
  position: relative;
  display: block;
}

.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 60;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(21, 32, 43, 0.14);
  max-height: 18rem;
  overflow-y: auto;
}

.suggest-list[hidden] {
  display: none !important;
}

.suggest-item {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.suggest-item:hover,
.suggest-item.is-active {
  background: rgba(11, 110, 106, 0.08);
}

.suggest-item-label {
  font-weight: 600;
  line-height: 1.25;
}

.suggest-item-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}

.filters .btn {
  box-sizing: border-box;
  height: 2.75rem;
  padding: 0 1.2rem;
  border-radius: 10px;
}

.filters-more {
  display: none;
  appearance: none;
  box-sizing: border-box;
  height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  position: relative;
}

.filters-more:hover {
  border-color: rgba(11, 110, 106, 0.35);
  color: var(--accent-ink);
}

.filters-more[aria-expanded="true"] {
  border-color: rgba(11, 110, 106, 0.4);
  background: #e4eef0;
  color: var(--accent-ink);
}

.filters-icon {
  display: block;
  flex: 0 0 auto;
}

.filters-submit {
  gap: 0.4rem;
}

.filters-more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.filters-more-badge[hidden] {
  display: none !important;
}

/* Keep suggestions above sticky chrome; backdrop-filter can clip abs children */
.filters-dock,
.filters-dock .wrap,
.filters-dock .filters,
.filters-dock .field.grow,
.filters-dock .suggest-wrap {
  overflow: visible;
}

.filters-dock.is-stuck {
  z-index: 25;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.btn:hover { filter: brightness(1.05); color: #fff; }

.btn.ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-ink);
  border-color: rgba(11, 110, 106, 0.55);
  box-shadow: inset 0 0 0 0 transparent;
}

.btn.ghost:hover {
  background: rgba(11, 110, 106, 0.1);
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  filter: none;
}

.meta-count {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.4rem 0 0.9rem;
}

.feed-status,
.feed-end {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 1rem 0 0.4rem;
}

.feed-more-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.tender-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.tender-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tender-row:hover {
  border-color: rgba(11, 110, 106, 0.45);
  transform: translateY(-1px);
  color: inherit;
}

.tender-main h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0.35rem 0 0.25rem;
  font-weight: 500;
}

.buyer { margin: 0; color: var(--muted); font-size: 0.95rem; }

.tender-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--tag);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag.muted {
  background: #eef1f4;
  color: var(--muted);
  font-weight: 500;
}

.tender-side {
  text-align: right;
  min-width: 10rem;
}

.value { font-weight: 700; }
.deadline { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* Label above date/money value, with small icons for scanning. */
.tender-side .value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.side-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--accent, #0b6e6a);
  opacity: 0.95;
}
.side-ico svg {
  display: block;
  overflow: visible;
}

.tender-side .side-date {
  margin-top: 0.5rem;
}
.tender-side > .side-date:first-child {
  margin-top: 0;
}
.tender-side .side-date .deadline {
  margin-top: 0;
  margin-bottom: 0.12rem;
}
.tender-side .side-date .value {
  font-size: 0.95rem;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
  color: var(--muted);
}

.empty, .empty-page {
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.crumb { margin: 0 0 1rem; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--accent); }

.detail {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.detail-head h1 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0.55rem 0 0.5rem;
}

.lead { color: var(--muted); margin: 0 0 1.2rem; max-width: 50rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem 1.1rem;
  margin: 0 0 1.3rem;
}

.facts div {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.facts dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.facts dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.facts code {
  font-size: 0.9rem;
  font-weight: 500;
  background: #f2f5f7;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.disposition {
  margin: 0 0 1.35rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}

.disposition-title {
  margin: 0.85rem 0 0.75rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.disposition-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.disposition-list li {
  padding: 0.75rem 0 0.85rem 0.95rem;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, var(--line));
}

.disposition-action {
  margin: 0;
  font-weight: 650;
  line-height: 1.35;
}

.disposition-detail {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 46rem;
}

.disposition-party {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  color: var(--ink);
  opacity: 0.82;
}

.disposition-fallback {
  margin: 0;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46rem;
}


.facts code {
  font-size: 0.9rem;
  font-weight: 500;
  background: #f2f5f7;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.foot {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 0 0 2.75rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.92rem;
}

.foot-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem 3rem;
  padding-top: 1.75rem;
}

.foot-brand p {
  margin: 0.7rem 0 0;
  max-width: 28rem;
  line-height: 1.5;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.foot-logo img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(5, 59, 57, 0.18);
}

.foot-logo:hover {
  color: var(--accent-ink);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.foot-col h2 {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

.foot a:hover,
.foot a[aria-current="page"] {
  color: var(--accent-ink);
}

.to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 30;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11, 110, 106, 0.35);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.15s ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.to-top:hover { filter: brightness(1.08); }

@media (max-width: 720px) {
  .tender-row {
    grid-template-columns: 1fr;
  }
  .tender-side {
    text-align: left;
  }
  .top-inner {
    min-height: 4.25rem;
    padding: 0.65rem 0;
    gap: 0.75rem;
  }
  .brand {
    gap: 0.75rem;
    font-size: 1.45rem;
  }
  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  .menu-toggle {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
  }

  /* Mobile list filters (dock only) — compact search row */
  .filters-dock.is-stuck {
    padding: 0.4rem 0;
  }

  .filters-dock .filters {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem;
  }

  .filters-dock .filters .field > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .filters-dock .filters .field {
    min-width: 0;
  }

  .filters-dock .filters .field.grow {
    flex: 1 1 auto;
  }

  .filters-dock .filters .field input,
  .filters-dock .filters .field select,
  .filters-dock .filters .select-wrap,
  .filters-dock .filters .btn,
  .filters-dock .filters-more {
    height: 2.45rem;
  }

  .filters-dock .filters-submit {
    width: 2.45rem;
    min-width: 2.45rem;
    padding: 0;
    border-radius: 10px;
  }

  .filters-dock .filters-submit-label,
  .filters-dock .filters-more-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .filters-dock .filters-more {
    display: none;
    width: 2.45rem;
    min-width: 2.45rem;
    padding: 0;
  }

  .filters-dock.has-extra-filters .filters-more {
    display: inline-flex;
  }

  .filters-dock .filters-more-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.05rem;
    height: 1.05rem;
    font-size: 0.65rem;
  }

  .filters-dock.has-extra-filters:not(.is-expanded) .field:not(.grow) {
    display: none;
  }

  .filters-dock.has-extra-filters.is-expanded {
    flex-wrap: wrap;
  }

  .filters-dock.has-extra-filters.is-expanded .filters {
    flex-wrap: wrap;
  }

  .filters-dock.has-extra-filters.is-expanded .field:not(.grow) {
    flex: 1 1 calc(50% - 0.45rem);
    min-width: calc(50% - 0.45rem);
  }

  .filters-dock.has-extra-filters.is-expanded .field:not(.grow) > span:first-child {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 0.7rem;
  }

  .filters-dock.is-stuck .filters {
    gap: 0.45rem;
    padding: 0.45rem;
  }
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 0 0 2.25rem;
  align-items: stretch;
}

.pricing-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 251, 0.98) 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pricing-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--line);
}

.pricing-card.plan-free::before {
  background: linear-gradient(90deg, #9aacb8, #c5d0d8);
}

.pricing-card.plan-pro::before {
  background: linear-gradient(90deg, #0b6e6a, #1aa39a);
}

.pricing-card.plan-custom::before {
  background: linear-gradient(90deg, #1e3a4c, #0b6e6a 55%, #c4a35a);
}

.pricing-card.plan-addon::before {
  background: linear-gradient(90deg, #c4a35a, #8a1f1a 70%);
}

.pricing-addon {
  margin: 0 0 1.75rem;
}

.pricing-addon-head {
  margin: 0 0 0.85rem;
  max-width: 40rem;
}

.pricing-addon-head h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: 0.15rem 0 0.45rem;
  color: var(--ink);
}

.pricing-addon .pricing-card {
  max-width: 28rem;
}

.pricing-addon-note {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.analyze-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.analyze-form label,
.analyze-run label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.analyze-form select,
.analyze-form input[type="text"],
.analyze-run textarea,
.analyze-run input[type="file"] {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.analyze-run > label {
  width: 100%;
  align-self: stretch;
}

.analyze-record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  margin: 0.35rem 0 0.85rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.analyze-record-sector {
  color: var(--ink);
  font-weight: 500;
}

.analyze-record-sep {
  color: var(--muted);
}

.analyze-record-id {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.92em;
  font-weight: 600;
  color: #1a2a38;
  background: #eef2f5;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.analyze-docs-label {
  width: 100%;
}

.analyze-docs-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.analyze-fill-help .meta-count {
  margin: 0 0 0.85rem;
}

.analyze-draft + .analyze-draft {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.analyze-draft h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.analyze-draft-body {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #f6f8fa;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 22rem;
  overflow: auto;
}

.analyze-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.analyze-grow {
  flex: 1 1 14rem;
}

.analyze-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.analyze-run {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.analyze-run .btn {
  align-self: flex-start;
}

.analyze-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.5;
}

.analyze-list li + li {
  margin-top: 0.35rem;
}

.analyze-disclaimer {
  margin: 0.5rem 0 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--tag);
  color: var(--accent-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.analyze-result {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 2rem;
}

.analyze-gate p + p {
  margin-top: 0.75rem;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(21, 32, 43, 0.1);
}

.pricing-card.is-featured {
  border-color: rgba(11, 110, 106, 0.4);
  background:
    linear-gradient(165deg, #ffffff 0%, #eef7f6 55%, #e4eef0 100%);
  box-shadow: 0 16px 40px rgba(11, 110, 106, 0.14);
}

.pricing-card.is-featured:hover {
  box-shadow: 0 20px 44px rgba(11, 110, 106, 0.18);
}

.pricing-card-top {
  margin-bottom: 0.35rem;
}

.pricing-eyebrow {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(21, 32, 43, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pricing-card.is-featured .pricing-eyebrow {
  background: rgba(11, 110, 106, 0.14);
  color: var(--accent-ink);
}

.pricing-card h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pricing-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  min-height: 2.8em;
}

.pricing-price {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pricing-amount {
  font-family: var(--display);
  font-size: 2.55rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pricing-from,
.pricing-period {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.pricing-features {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  color: var(--ink);
  flex: 1 1 auto;
}

.pricing-features li {
  position: relative;
  margin: 0;
  padding: 0.55rem 0 0.55rem 1.55rem;
  border-top: 1px solid rgba(213, 221, 230, 0.85);
  font-size: 0.94rem;
  line-height: 1.35;
  color: var(--muted);
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(11, 110, 106, 0.16);
  box-shadow: inset 0 0 0 3px #0b6e6a;
}

.pricing-card-cta {
  margin-top: auto;
  padding-top: 1.25rem;
}

.pricing-card-cta .btn {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.85rem;
  border-radius: 12px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.pricing-card-cta .btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(11, 110, 106, 0.28);
  color: #fff;
}

.pricing-card-cta .btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(11, 110, 106, 0.18);
}

.pricing-card-cta .btn.ghost:hover {
  background: #e4eef0;
  border-color: rgba(11, 110, 106, 0.45);
  color: var(--accent-ink);
  filter: none;
  box-shadow: 0 10px 22px rgba(21, 32, 43, 0.1);
}

.pricing-card.plan-custom .btn:not(.ghost) {
  background: #1e3a4c;
}

.pricing-card.plan-custom .btn:not(.ghost):hover {
  background: #274b61;
  filter: none;
  color: #fff;
  box-shadow: 0 10px 22px rgba(30, 58, 76, 0.35);
}

/* Cookie notice — essential-only (no marketing CMP) */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0.9rem 0 calc(0.9rem + env(safe-area-inset-bottom, 0px));
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(21, 32, 43, 0.1);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.cookie-banner-title {
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.cookie-banner-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 40rem;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

.admin-page {
  padding-bottom: 2rem;
  overflow-x: clip;
  max-width: 100%;
}

.admin-page .hero-line p,
.admin-page .flash,
.admin-page .meta-count {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-page .admin-card-head {
  flex-wrap: wrap;
  min-width: 0;
}

.admin-page .admin-card-head h2,
.admin-page .admin-card-head .meta-count {
  min-width: 0;
  max-width: 100%;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.account-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0 0 1.5rem;
  align-items: start;
}

.account-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 900px) {
  .account-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.admin-card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 1.15rem;
}

.admin-card-note {
  margin: -0.45rem 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  cursor: help;
  color: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.admin-tip-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  color: var(--muted);
  background: var(--tag);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.admin-tip-mark.is-inline {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 0.1rem;
}

.admin-tip:hover .admin-tip-mark,
.admin-tip:focus .admin-tip-mark,
.admin-tip:focus-visible .admin-tip-mark,
.admin-tip.is-open .admin-tip-mark {
  color: var(--accent-ink);
  border-color: rgba(11, 110, 106, 0.35);
  background: rgba(11, 110, 106, 0.12);
}

.admin-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 40;
  width: max-content;
  max-width: min(18rem, 70vw);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #1c2a36;
  color: #f4f7fa;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 10px 28px rgba(16, 28, 40, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  pointer-events: none;
  white-space: normal;
}

.admin-tip::before {
  content: '';
  position: absolute;
  left: 0.85rem;
  bottom: calc(100% + 0.2rem);
  z-index: 41;
  border: 6px solid transparent;
  border-top-color: #1c2a36;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s;
  pointer-events: none;
}

/* Desktop hover; keyboard focus; tap (.is-open) for touch */
@media (hover: hover) and (pointer: fine) {
  .admin-tip:hover::after,
  .admin-tip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Tap/keyboard open uses a fixed .admin-tip-bubble (not clipped by overflow parents). */
.admin-tip.is-open::after,
.admin-tip.is-open::before,
.admin-tip:focus-visible::after,
.admin-tip:focus-visible::before {
  opacity: 0 !important;
  visibility: hidden !important;
}

.admin-tip-bubble {
  position: fixed;
  z-index: 1200;
  box-sizing: border-box;
  width: max-content;
  max-width: min(22rem, calc(100vw - 1.25rem));
  max-height: min(55vh, 18rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #1c2a36;
  color: #f4f7fa;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 12px 32px rgba(16, 28, 40, 0.35);
  pointer-events: auto;
}

.admin-tip-bubble[hidden] {
  display: none !important;
}

.admin-card h2 .admin-tip {
  font: inherit;
  color: inherit;
}

.admin-users-table th .admin-tip {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.admin-usage-block h3 .admin-tip {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.admin-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-card-head h2 {
  margin: 0;
}

.account-key-reveal {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(11, 110, 106, 0.28);
  background: rgba(11, 110, 106, 0.08);
}

.account-key-value {
  display: block;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #15202b;
  color: #f4f7fa;
  font-size: 0.82rem;
  word-break: break-all;
  user-select: all;
}

.account-key-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.account-key-form .field {
  flex: 1 1 12rem;
  margin: 0;
}

.account-key-form .field input,
.account-key-form .btn {
  height: 2.75rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 0.95rem;
  padding: 0 0.95rem;
}

.account-ai-form {
  flex-direction: column;
  align-items: stretch;
}

.account-ai-form .field {
  flex: 1 1 auto;
  width: 100%;
}

.account-ai-form .btn {
  align-self: flex-start;
}

.account-ai-status-label {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.account-ai-add-label {
  margin-top: 1.15rem;
}

.account-ai-key-hints {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  line-height: 1.45;
}

.account-ai-key-hints li + li {
  margin-top: 0.4rem;
}

.account-ai-slots {
  margin: 0.85rem 0 0.25rem;
  display: grid;
  gap: 0.55rem;
}

.account-ai-slot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev, #fff);
}

.account-ai-slot.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  box-shadow: inset 0 0 0 1px rgba(11, 110, 106, 0.08);
}

.account-ai-slot-main {
  min-width: 0;
  flex: 1 1 12rem;
}

.account-ai-slot-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.account-ai-slot-title strong {
  font-size: 0.98rem;
}

.account-ai-slot-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
}

.account-ai-slot-meta {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #5a6b76);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: baseline;
}

.account-ai-slot-meta code {
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: #15202b;
  color: #f4f7fa;
  font-size: 0.82rem;
}

.account-ai-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.account-ai-slot-actions .btn {
  height: 2.35rem;
  min-height: 2.35rem;
}

.account-ai-form-hint {
  margin: 0.55rem 0 0;
}

.account-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.account-ai-actions .btn {
  height: 2.75rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  margin: 0;
  align-self: auto;
}

.ai-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}

.ai-presets .btn.is-active,
.ai-presets .btn.ghost.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ai-presets .btn.is-active:hover,
.ai-presets .btn.ghost.is-active:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}

.analyze-byok-hint {
  margin: 0 0 1rem;
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.profile-list li {
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.profile-list-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-list-main strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.profile-badge {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--tag);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.profile-badge.is-on {
  color: var(--accent-ink);
  background: rgba(11, 110, 106, 0.12);
}

.profile-list-meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.profile-list-action {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.btn.btn-compact {
  min-width: 0;
  height: 2.1rem;
  padding: 0 0.8rem;
  border-radius: 9px;
  font-size: 0.88rem;
}

.btn.btn-danger,
.btn.ghost.btn-danger {
  color: #8a1f1a;
  border-color: rgba(138, 31, 26, 0.45);
  background: rgba(253, 236, 235, 0.85);
}

.btn.btn-danger:hover,
.btn.ghost.btn-danger:hover {
  color: #6e1511;
  border-color: #8a1f1a;
  background: #fdeceb;
  filter: none;
}

.account-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.account-hero form {
  flex: 0 0 auto;
  margin: 0;
}

.profile-list .btn-compact {
  margin-top: 0.55rem;
}

.profile-stop-form {
  display: inline;
  margin: 0;
}

@media (max-width: 560px) {
  .account-hero {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1rem;
  }

  .account-hero-actions {
    margin-top: 0.35rem;
    margin-bottom: 0.25rem;
  }

  .account-hero .btn {
    width: 100%;
  }
}

.admin-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.admin-stats li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  align-items: baseline;
  font-size: 0.95rem;
  min-width: 0;
}

.admin-stats span {
  color: var(--muted);
  min-width: 0;
  flex: 1 1 10rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.admin-stats strong {
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.admin-stats strong.is-empty { color: #8a1f1a; }
.admin-stats strong.is-warn { color: #9a6700; }
.admin-stats strong.admin-stat-wide {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  max-width: min(14rem, 100%);
  flex: 1 1 8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

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

  .admin-stats li {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .admin-stats strong,
  .admin-stats strong.admin-stat-wide {
    text-align: left;
    max-width: 100%;
  }
}

.admin-users {
  margin: 0 0 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.admin-users .admin-card-head {
  margin-bottom: 0.85rem;
}

/* Shared: horizontal scroll on narrow screens, cells stay on one line */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-scroll > table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  white-space: nowrap;
}

.admin-users-table {
  font-size: 0.92rem;
}

.admin-users-table th,
.admin-users-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-users-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-users-table td.is-warn {
  color: #9a6700;
  font-weight: 600;
}

.admin-users-table a {
  color: var(--accent-ink);
}

.admin-users-table .profile-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.admin-usage {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.admin-usage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0 0.15rem;
}

.admin-usage-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.admin-usage-chip.is-guest {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.28);
}
.admin-usage-chip.is-account {
  color: var(--accent-ink);
  background: rgba(11, 110, 106, 0.12);
  border-color: rgba(11, 110, 106, 0.22);
}
.admin-usage-chip.is-alerts {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
}
.admin-usage-chip.is-sheets {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.3);
}
.admin-usage-chip.is-api {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.28);
}
.admin-usage-chip.is-webhooks {
  color: #be185d;
  background: rgba(219, 39, 119, 0.12);
  border-color: rgba(219, 39, 119, 0.28);
}

.admin-usage-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
  max-height: min(28rem, 55vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.35rem;
  scrollbar-gutter: stable;
}

.admin-usage-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border-left-width: 4px;
}

.admin-usage-card.is-registered {
  border-left-color: #0b6e6a;
  background: rgba(11, 110, 106, 0.04);
}

.admin-usage-card.is-guest {
  border-left-color: #ea580c;
  background: rgba(234, 88, 12, 0.05);
}

.admin-usage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.admin-usage-head a {
  color: var(--accent-ink);
  word-break: break-all;
}

.admin-usage-name {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.admin-usage .profile-badge.is-guest {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.14);
}

.admin-usage .profile-badge.is-account {
  color: var(--accent-ink);
  background: rgba(11, 110, 106, 0.14);
}

.admin-usage-block {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.admin-usage-block.is-alerts {
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.2);
}
.admin-usage-block.is-alerts h3 { color: #1d4ed8; }

.admin-usage-block.is-sheets {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.22);
}
.admin-usage-block.is-sheets h3 { color: #047857; }

.admin-usage-block.is-api {
  background: rgba(124, 58, 237, 0.07);
  border-color: rgba(124, 58, 237, 0.2);
}
.admin-usage-block.is-api h3 { color: #6d28d9; }

.admin-usage-block.is-webhooks {
  background: rgba(219, 39, 119, 0.07);
  border-color: rgba(219, 39, 119, 0.2);
}
.admin-usage-block.is-webhooks h3 { color: #be185d; }

.admin-usage-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-usage-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.admin-usage-block li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  font-size: 0.9rem;
}

.admin-usage-feed {
  font-weight: 600;
}

.admin-usage-filters {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.admin-usage .profile-badge.is-warn {
  color: #9a6700;
  background: rgba(154, 103, 0, 0.12);
}

.admin-usage .profile-badge.is-empty {
  color: #8a1f1a;
  background: rgba(138, 31, 26, 0.1);
}

.pricing-note { margin-bottom: 2rem; }

.pricing-softnote {
  margin: 0.25rem 0 1.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--tag);
  color: var(--accent-ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.pricing-softnote a {
  font-weight: 600;
}

.pricing-note h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.25rem 0 0.6rem;
}

.pricing-note h2:first-child {
  margin-top: 0;
}

.code-block {
  margin: 0 0 0.85rem;
  padding: 0.9rem 1rem;
  background: #15202b;
  color: #e8eef3;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.45;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin: 0 0 1rem;
}

.flash.ok { background: #e4eef0; color: var(--accent-ink); }
.flash.err { background: #fdeceb; color: #8a1f1a; }

/* Server flash → promoted to toast (hidden inline until JS runs, then removed) */
.flash[data-toast] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.analyze-error {
  margin-top: 0.25rem;
}

body.analyze-wait-lock {
  overflow: hidden;
}

.analyze-wait-host {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem max(1rem, env(safe-area-inset-bottom, 0px));
  background: rgba(21, 32, 43, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: auto;
  cursor: wait;
}

.analyze-wait-card {
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 14px;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(21, 32, 43, 0.28);
  text-align: center;
  cursor: default;
}

.analyze-wait-bot {
  width: 4.5rem;
  height: 4rem;
  margin: 0 auto 0.75rem;
}

.analyze-wait-bot-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.analyze-wait-bot-figure {
  transform-origin: 40px 62px;
  animation: analyze-wait-bob 1.35s ease-in-out infinite;
}

.analyze-wait-bot-antenna,
.analyze-wait-bot-head,
.analyze-wait-bot-body,
.analyze-wait-bot-chest,
.analyze-wait-bot-mouth {
  fill: none;
  stroke: var(--accent-ink, #063f3d);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analyze-wait-bot-head,
.analyze-wait-bot-body {
  fill: color-mix(in srgb, var(--accent, #0b6e6a) 12%, #fff);
}

.analyze-wait-bot-chest {
  fill: color-mix(in srgb, var(--accent, #0b6e6a) 22%, #fff);
}

.analyze-wait-bot-mouth {
  fill: var(--accent-ink, #063f3d);
  stroke: none;
}

.analyze-wait-bot-bulb {
  fill: var(--accent, #0b6e6a);
  animation: analyze-wait-bulb 1.35s ease-in-out infinite;
}

.analyze-wait-bot-eye {
  fill: var(--accent-ink, #063f3d);
  transform-box: fill-box;
  transform-origin: center;
  animation: analyze-wait-blink 2.8s ease-in-out infinite;
}

.analyze-wait-bot-eye + .analyze-wait-bot-eye {
  animation-delay: 0.08s;
}

.analyze-wait-bot-doc {
  transform-origin: 64px 51px;
  animation: analyze-wait-read 1.8s ease-in-out infinite;
}

.analyze-wait-bot-page {
  fill: #fff;
  stroke: var(--accent-ink, #063f3d);
  stroke-width: 1.75;
}

.analyze-wait-bot-line {
  stroke: color-mix(in srgb, var(--accent, #0b6e6a) 55%, var(--line, #c5d0d6));
  stroke-width: 1.6;
  stroke-linecap: round;
  animation: analyze-wait-scan 1.4s ease-in-out infinite;
}

.analyze-wait-bot-line-2 { animation-delay: 0.15s; }
.analyze-wait-bot-line-3 { animation-delay: 0.3s; }

@keyframes analyze-wait-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes analyze-wait-bulb {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes analyze-wait-blink {
  0%, 42%, 48%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(0.12); }
}

@keyframes analyze-wait-read {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-2px); }
}

@keyframes analyze-wait-scan {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.analyze-wait-title {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.analyze-wait-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted, #5a6b76);
}

.toast-host {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem max(1rem, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.toast-host::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(21, 32, 43, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.toast-host.is-active {
  pointer-events: auto;
}

.toast-host.is-active::before {
  opacity: 1;
  pointer-events: auto;
}

.toast {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: start;
  width: min(26rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(70vh, 28rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(21, 32, 43, 0.28);
  transform: translateY(0.5rem) scale(0.98);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  box-sizing: border-box;
}

.toast.is-in {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast.is-out {
  transform: translateY(-0.35rem) scale(0.98);
  opacity: 0;
}

.toast-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.toast-body {
  margin: 0;
  grid-column: 1;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.toast-close {
  grid-column: 2;
  grid-row: 1 / span 2;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.toast-close:hover {
  color: var(--ink);
  background: var(--tag);
}

.toast.ok {
  border-color: rgba(11, 110, 106, 0.35);
  box-shadow:
    0 16px 40px rgba(21, 32, 43, 0.12),
    inset 3px 0 0 var(--accent);
}

.toast.ok .toast-title { color: var(--accent-ink); }

.toast.err {
  border-color: rgba(138, 31, 26, 0.28);
  box-shadow:
    0 16px 40px rgba(21, 32, 43, 0.12),
    inset 3px 0 0 #c0392b;
}

.toast.err .toast-title { color: #8a1f1a; }

.alert-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Signup forms (alerts / sheets) — stacked fields, not list-filter chrome */
.alert-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.75rem;
  align-items: end;
}

.alert-form .field {
  min-width: 0;
  width: 100%;
}

.alert-form .field.grow,
.alert-form > .btn {
  grid-column: 1 / -1;
}

.alert-form > .btn {
  width: auto;
  justify-self: end;
  min-width: 10rem;
}

.alert-form .field input,
.alert-form .field select,
.alert-form .select-wrap {
  width: 100%;
  max-width: 100%;
}

.docs-body code {
  word-break: break-all;
}

.sheets-steps {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.sheets-note {
  margin-top: 1rem;
}

/* Auth cards — compact, centered */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 2.5rem;
}

.auth-card {
  width: min(26rem, 100%);
  padding: 1.5rem 1.4rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f7fafb 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 18px 40px rgba(21, 32, 43, 0.08),
    inset 0 3px 0 var(--accent);
}

.auth-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.auth-lead {
  margin: 0.45rem 0 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-field {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.auth-field > span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-field > span em {
  font-style: normal;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}

.auth-field input {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 0.85rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.auth-field input:focus {
  outline: 2px solid rgba(11, 110, 106, 0.28);
  border-color: var(--accent);
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.auth-actions .btn {
  min-width: 7.5rem;
  height: 2.55rem;
  padding: 0 1.15rem;
  border-radius: 10px;
}

.auth-link,
.auth-hint {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}

.auth-link:hover {
  color: var(--accent-ink);
}

.auth-foot {
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

.auth-foot a {
  font-weight: 600;
  color: var(--accent-ink);
}

.auth-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 560px) {
  .auth-card {
    padding: 1.25rem 1.05rem 1.15rem;
  }

  .auth-row {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .auth-actions .btn {
    width: 100%;
  }

  .auth-link,
  .auth-hint {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .alert-form {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.95rem;
  }

  .alert-form .field > span:first-child {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .alert-form > .btn {
    width: 100%;
    justify-self: stretch;
    height: 2.85rem;
    margin-top: 0.15rem;
  }

  .sheets-steps {
    padding-left: 1.1rem;
    font-size: 0.95rem;
  }
}

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

  .pricing-lead {
    min-height: 0;
  }
}

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

/* --- Home landing --- */
body.page-home .page-home-main {
  padding-top: 0;
}

.home-hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4.5rem 0;
  margin: 0 0 2.5rem;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(5, 45, 48, 0.92) 0%, rgba(11, 110, 106, 0.62) 48%, rgba(21, 32, 43, 0.45) 100%),
    radial-gradient(ellipse 55% 70% at 100% 40%, rgba(11, 110, 106, 0.35), transparent 70%),
    linear-gradient(165deg, #0a3d3a 0%, #15202b 55%, #1a2836 100%);
  color: #f4f7f8;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -18deg,
      transparent 0,
      transparent 11px,
      rgba(255, 255, 255, 0.028) 11px,
      rgba(255, 255, 255, 0.028) 12px
    );
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem 3rem;
  align-items: center;
  text-align: left;
}

.home-hero-copy {
  max-width: 34rem;
  padding-bottom: 0;
}

.home-brand {
  margin: 0 0 1.05rem;
  font-family: var(--display);
  font-size: clamp(3rem, 8.5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.9;
}

.home-hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: rgba(244, 247, 248, 0.92);
  max-width: 22ch;
}

.home-lead {
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(244, 247, 248, 0.78);
  max-width: 32rem;
}

.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-start;
}

.home-hero .btn {
  border-radius: 12px;
  min-height: 2.85rem;
  padding: 0.75rem 1.25rem;
}

.home-hero .btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.home-hero .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.home-hero-visual {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 1.5rem;
}

.home-hero-visual a {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: rgba(244, 247, 248, 0.42);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.home-hero-visual a:hover {
  color: #fff;
  transform: translateX(4px);
}

.home-section {
  margin: 0 auto 2.75rem;
}

.home-section h2,
.home-bottom h2 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
}

.home-section-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 40rem;
}

.home-audience {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.home-audience li {
  display: grid;
  gap: 0.25rem;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--accent);
}

.home-audience strong {
  font-size: 1.05rem;
}

.home-audience span {
  color: var(--muted);
}

.home-sectors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.home-sectors a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.05rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.home-sectors a:hover {
  border-color: rgba(11, 110, 106, 0.45);
  color: var(--accent-ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(21, 32, 43, 0.08);
}

.home-sources {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
}

.home-sources li {
  margin: 0.4rem 0;
}

.home-note {
  color: var(--muted);
  margin: 0;
}

.home-bottom {
  margin: 0 auto 1.5rem;
  padding: 1.6rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(11, 110, 106, 0.1), rgba(21, 32, 43, 0.04));
  border: 1px solid rgba(11, 110, 106, 0.2);
}

.home-bottom p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  max-width: 36rem;
}

.home-bottom .btn.ghost {
  border-width: 2px;
  border-color: var(--accent);
  background: #fff;
  color: var(--accent-ink);
  font-weight: 700;
}

.home-bottom .btn.ghost:hover {
  background: rgba(11, 110, 106, 0.1);
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

.home-bottom .home-cta-alerts {
  border: 2px solid var(--accent);
  color: var(--accent-ink);
  background: rgba(11, 110, 106, 0.06);
  font-weight: 700;
}

.home-bottom .home-cta-alerts:hover {
  background: rgba(11, 110, 106, 0.14);
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  filter: none;
}

.coming-soon {
  display: grid;
  place-items: center;
  min-height: min(70vh, 36rem);
  padding: 2rem 0;
}

.coming-soon-card {
  width: min(36rem, 100%);
  text-align: center;
}

.coming-soon-card h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0.35rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.coming-soon-card > p {
  color: var(--muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.coming-soon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.coming-soon-hint {
  margin-top: 1.25rem !important;
  font-size: 0.9rem;
}

body.page-coming-soon .page {
  display: flex;
  align-items: center;
}

/* --- Legal + docs --- */
.legal-body {
  max-width: 46rem;
}

.docs-body {
  max-width: none;
  width: 100%;
}

.legal-body h2,
.docs-body h2 {
  margin: 1.6rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.25rem;
}

.legal-body p,
.docs-body p,
.legal-body li,
.docs-body li {
  color: var(--muted);
}

.legal-body ul,
.docs-body ul {
  padding-left: 1.15rem;
}

.legal-links {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.docs-table-wrap {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}

.docs-table {
  font-size: 0.9rem;
}

.docs-table th,
.docs-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.docs-table th {
  background: rgba(21, 32, 43, 0.04);
  color: var(--ink);
  font-weight: 700;
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-table code {
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .foot-panel {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding-top: 1.35rem;
  }

  .foot-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.25rem;
  }
}

/* Phone footer: stacked sections, even 2-col link grids */
@media (max-width: 640px) {
  .foot {
    font-size: 0.94rem;
  }

  .foot-panel {
    gap: 0;
    padding-top: 1.15rem;
  }

  .foot-brand {
    padding-bottom: 1.15rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid var(--line);
  }

  .foot-brand p {
    max-width: none;
    margin-top: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .foot-cols {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .foot-col {
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--line);
  }

  .foot-col:last-child {
    border-bottom: 0;
    padding-bottom: 0.25rem;
  }

  .foot-col h2 {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
  }

  .foot-col ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 0.55rem;
    align-items: start;
  }

  .foot-col a {
    display: inline-block;
    line-height: 1.35;
    font-size: 0.92rem;
  }
}

@media (max-width: 820px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
  }

  .home-hero-visual {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-left: 0;
    padding-top: 1.1rem;
    gap: 0.35rem;
  }

  .home-hero-visual a {
    font-size: 1.1rem;
  }
}

@media (max-width: 720px) {
  .home-hero {
    min-height: 0;
    padding: 3.5rem 0;
    align-items: center;
  }

  .home-sectors {
    grid-template-columns: 1fr;
  }
}

/* —— Нощен пазар —— */
.nm-page {
  padding-bottom: 3rem;
}

.nm-brief {
  margin: 0 0 2rem;
}

.nm-brief-head {
  margin-bottom: 1rem;
}

.nm-date {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.nm-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.nm-bias {
  margin: 0 0 1.1rem;
  line-height: 1.45;
  color: var(--ink);
}

.nm-bias-label {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.nm-bias-continuation strong {
  color: #1a7a4c;
}

.nm-bias-fade strong {
  color: #b06a12;
}

.nm-bias-ignore strong {
  color: var(--muted);
}

.nm-summary p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.nm-block {
  margin: 0 0 1.15rem;
}

.nm-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.nm-block p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.nm-watch {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.5;
}

.nm-watch li + li {
  margin-top: 0.35rem;
}

.nm-disclaimer {
  margin: 1.25rem 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.nm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
}

.nm-signals h2,
.nm-archive h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0 0 0.85rem;
}

.nm-archive {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.nm-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 42rem;
}

.nm-archive-list li + li {
  border-top: 1px solid var(--line);
}

.nm-archive-list a {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  text-decoration: none;
  color: inherit;
}

.nm-archive-list a:hover .nm-archive-title {
  text-decoration: underline;
}

.nm-archive-date {
  flex: 0 0 5.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nm-archive-title {
  flex: 1;
  font-weight: 550;
}
