/* Secure Publish console — warm-product (aligned with landing) */
:root {
  --cream: #FAF8F5;
  --cream-2: #F3EFE9;
  --stone: #E8E2D9;
  --ink: #292524;
  --ink-soft: #57534E;
  --muted: #78716C;
  --line: #E7E0D6;
  --sage: #5F7A61;
  --sage-hover: #4E6650;
  --sage-soft: #E8F0E9;
  --white: #FFFEFC;
  --danger: #9F1239;
  --display: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(41,37,36,0.04), 0 8px 24px rgba(41,37,36,0.05);
  --shadow-lg: 0 2px 4px rgba(41,37,36,0.04), 0 16px 40px rgba(41,37,36,0.08);
  --max: 560px;
  --max-wide: 1040px;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--cream-2);
  min-height: 100%;
  min-height: 100dvh;
}
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 1.03rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(95,122,97,0.08), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(232,226,217,0.9), transparent 50%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
a { color: var(--sage); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sage-hover); }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Top bar — product nav feel */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,254,252,0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.topbar__brand:hover { color: var(--sage); }
.topbar__meta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--cream-2);
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
.topbar__lang a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.topbar__lang a.is-active {
  color: var(--ink);
  font-weight: 650;
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar__logout {
  font-size: 0.85rem;
  font-weight: 550;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--stone);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.topbar__logout:hover {
  border-color: var(--sage);
  color: var(--sage);
  background: var(--sage-soft);
}

.main {
  flex: 1;
  width: min(100% - 2.25rem, var(--max));
  margin: 1.75rem auto 3.5rem;
}
.main--wide { width: min(100% - 2.25rem, var(--max-wide)); }

.eyebrow, .skeleton-tag {
  display: inline-block;
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-soft);
  border: 1px solid rgba(95,122,97,0.2);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.45rem;
  line-height: 1.15;
  color: var(--ink);
}
h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.lede {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 1.02rem;
  max-width: 40rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.3rem;
}
.card + .card { margin-top: 1rem; }
.card--lift:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(95,122,97,0.35);
}

.idp-list { display: grid; gap: 0.7rem; }
.idp-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.idp-btn__icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.idp-btn__icon svg { display: block; width: 20px; height: 20px; }
.idp-btn__label { line-height: 1.2; }
.idp-btn:hover {
  border-color: var(--sage);
  background: var(--sage-soft);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}
.oauth-tip {
  margin: 0.85rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.note {
  margin: 1.2rem 0 0;
  padding: 0.95rem 1.05rem;
  background: var(--sage-soft);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(95,122,97,0.22);
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.note strong { color: var(--ink); }

.choice-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .choice-grid { grid-template-columns: 1fr 1fr; }
}
.choice {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.choice:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(95,122,97,0.4);
  text-decoration: none;
  color: inherit;
}
.choice h2 {
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
}
.choice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.field { margin-top: 1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.field-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--stone);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-row:focus-within {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(95,122,97,0.15);
}
.field-row input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--ink);
  min-width: 0;
}
.field-row input:focus { outline: none; }
.field-row .suffix {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  background: var(--cream-2);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--mono);
  border-left: 1px solid var(--stone);
  white-space: nowrap;
}
.hint { margin: 0.45rem 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}
.btn--primary:hover {
  background: var(--sage-hover);
  border-color: var(--sage-hover);
  color: #fff;
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  border-color: var(--stone);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--ink);
  text-decoration: none;
}

.host-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}
.host-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(95,122,97,0.2);
}

.empty {
  text-align: center;
  padding: 2.75rem 1.5rem;
}
.empty h2 {
  font-size: 1.4rem;
  margin: 0 0 0.55rem;
}
.empty p {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.footer-note {
  margin-top: auto;
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Console tabs */
.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
  padding: 0.3rem;
  background: var(--cream-2);
  border: 1px solid var(--stone);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.tabs a {
  text-decoration: none;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.tabs a[aria-current="page"] {
  background: var(--white);
  color: var(--ink);
  border-color: var(--stone);
  box-shadow: var(--shadow);
}
.tabs a:hover { color: var(--ink); text-decoration: none; }

.subtabs {
  display: flex;
  gap: 0.2rem;
  margin: 0 0 1.35rem;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.subtabs button,
.subtabs button[role="tab"],
.subtabs > button {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 0 -1px 0 !important;
  padding: 0.7rem 1.05rem !important;
  font-family: var(--sans) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: var(--muted) !important;
  cursor: pointer;
  text-shadow: none !important;
}
.subtabs button[aria-selected="true"],
.subtabs button[role="tab"][aria-selected="true"] {
  color: var(--ink) !important;
  border-bottom-color: var(--sage) !important;
  background: transparent !important;
}
.subtabs button:hover,
.subtabs button:focus-visible {
  color: var(--ink) !important;
  outline: none;
}
.subtabs button:focus-visible {
  box-shadow: inset 0 -2px 0 var(--sage) !important;
}

/* Table */
.table-wrap { overflow-x: auto; padding: 0 !important; }
table.pubs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.pubs th, table.pubs td {
  text-align: left;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.pubs th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 650;
  background: linear-gradient(180deg, #F7F3ED 0%, var(--cream-2) 100%);
  border-bottom: 1px solid var(--stone);
}
table.pubs thead th:first-child { border-radius: 12px 0 0 0; }
table.pubs thead th:last-child { border-radius: 0 12px 0 0; }
table.pubs tbody tr:hover td { background: rgba(250,248,245,0.7); }
table.pubs tr:last-child td { border-bottom: none; }
.url-cell code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--cream-2);
  border: 1px solid var(--stone);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}
.viewers {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.viewers li + li { margin-top: 0.4rem; }
.viewers strong { color: var(--ink); font-weight: 650; }
.muted-sm { color: var(--muted); font-size: 0.8rem; }

.row-actions { position: relative; white-space: nowrap; }
.icon-btn {
  appearance: none;
  border: 1px solid var(--stone);
  background: var(--white);
  border-radius: 8px;
  width: 2.15rem;
  height: 2.15rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.icon-btn:hover {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--ink);
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 5;
  min-width: 11rem;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
}
.menu[hidden] { display: none; }
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: none;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  color: var(--ink);
}
.menu button:hover { background: var(--sage-soft); }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--cream-2);
  border: 1px solid var(--stone);
  color: var(--ink-soft);
  margin-left: 0.4rem;
  vertical-align: middle;
}
.badge--org {
  background: var(--sage-soft);
  color: var(--sage-hover);
  border-color: rgba(95,122,97,0.25);
}

/* Share sheet */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(41,37,36,0.4);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.overlay[hidden] { display: none; }
.sheet {
  width: min(100%, 440px);
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 1.4rem 1.35rem 1.35rem;
}
.sheet h2 {
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}
.radio {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--stone);
  border-radius: 10px;
  margin-top: 0.6rem;
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.15s, background 0.15s;
}
.radio:has(input:checked) {
  border-color: var(--sage);
  background: var(--sage-soft);
}
.radio input { margin-top: 0.25rem; accent-color: var(--sage); }
.radio strong { display: block; font-size: 0.96rem; color: var(--ink); }
.radio span span { display: block; font-size: 0.84rem; color: var(--ink-soft); margin-top: 0.2rem; line-height: 1.45; }
.sheet textarea {
  width: 100%;
  min-height: 4.5rem;
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--stone);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  background: var(--cream);
  color: var(--ink);
}
.sheet textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(95,122,97,0.15);
}
.sheet textarea:disabled { opacity: 0.45; }

/* Pill subtabs — avoid native button chrome entirely */
.subtabs--pills {
  display: inline-flex;
  gap: 0.3rem;
  margin: 0 0 1.35rem;
  padding: 0.3rem;
  border: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  border-radius: 999px;
  background: var(--cream-2);
  width: fit-content;
  max-width: 100%;
}
.subtabs--pills button,
.subtabs--pills button[role="tab"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  border: 1px solid transparent !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 999px !important;
  margin: 0 !important;
  padding: 0.5rem 1.05rem !important;
  background: transparent !important;
  color: var(--ink-soft) !important;
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  box-shadow: none !important;
}
.subtabs--pills button[aria-selected="true"],
.subtabs--pills button[role="tab"][aria-selected="true"] {
  background: var(--white) !important;
  color: var(--ink) !important;
  border-color: var(--stone) !important;
  box-shadow: var(--shadow) !important;
}
.subtabs--pills button:hover {
  color: var(--ink) !important;
}
