/* Publishing surface — shared chrome (wizard host, dashboard, team views).
 * Softened civic-newsprint: warm ink, taupe rules, gentle radius + shadow,
 * Sage Civic accent. Archivo display + IBM Plex Sans body + JetBrains Mono.
 * (Inherits --line / --radius / --shadow tokens from openyyc.css.)
 */

:root {
  --oy-ink: #26221d;        /* warm near-black, matches the global ink */
  --oy-paper: #ffffff;      /* card surface, aligned to the bright reskin */
  --oy-sage: #4db58b;       /* teal, matches the portal's secondary surface */
  --oy-rust: #0369c1;      /* accent aligned to the portal's Civic Blue */
  --oy-warn: #8a5a00;
  --oy-block: #8b1a1a;      /* genuine danger / blocking state — stays red */
}

.oy-wizard {
  max-width: 880px;
  padding: 32px 24px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--oy-ink);
}

.oy-wizard__header {
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.oy-wizard__eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

.oy-wizard__title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 8px 0;
}

.oy-wizard__hint {
  font-size: 13px;
  color: rgba(26, 26, 24, 0.7);
  margin: 0;
}

.oy-wizard__discard {
  margin-left: 24px;
  font-size: 12px;
  text-decoration: underline;
  color: var(--oy-block);
}

/* Stepper ──────────────────────────────────────────────── */

.oy-stepper {
  list-style: none;
  margin: 0 0 32px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 1px solid var(--oy-ink);
}

.oy-stepper__step {
  padding: 12px 14px;
  border-right: 1px solid var(--oy-ink);
  background: var(--oy-paper);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.oy-stepper__step:last-child { border-right: none; }
.oy-stepper__step--done   { background: rgba(90, 122, 95, 0.18); }
.oy-stepper__step--active { background: var(--oy-ink); color: var(--oy-paper); }

.oy-stepper__index {
  display: block;
  font-weight: 700;
  font-size: 13px;
}

.oy-stepper__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Forms ────────────────────────────────────────────────── */

.oy-form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.oy-form__field { display: flex; flex-direction: column; gap: 4px; }

.oy-form__field > span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.oy-form__field input[type="text"],
.oy-form__field input[type="date"],
.oy-form__field select,
.oy-form__field textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.oy-form__hint { font-size: 12px; color: rgba(26, 26, 24, 0.65); }
.oy-form__error { color: var(--oy-block); font-size: 12px; }

.oy-form__group {
  border: 1px solid var(--oy-ink);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.oy-form__radio,
.oy-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
}

.oy-form__radio--suggested {
  background: rgba(176, 74, 46, 0.08);
  padding: 4px 6px;
}

.oy-form__radio-meta {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(26, 26, 24, 0.7);
}

.oy-form__actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.oy-form__attest {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--oy-ink);
  background: rgba(90, 122, 95, 0.08);
  align-items: flex-start;
}

.oy-button {
  display: inline-block;
  padding: 10px 18px;
  font: 600 14px "IBM Plex Sans", sans-serif;
  border: 1px solid var(--line-strong);
  background: var(--oy-paper);
  color: var(--oy-ink);
  cursor: pointer;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.oy-button:hover { background: var(--oy-ink); color: var(--oy-paper); }
.oy-button--primary { background: var(--oy-ink); color: var(--oy-paper); }
.oy-button--primary:hover { background: var(--oy-rust); border-color: var(--oy-rust); }

.oy-button--publish {
  background: var(--oy-rust);
  border-color: var(--oy-rust);
  color: var(--oy-paper);
  font-size: 16px;
  padding: 14px 24px;
}

.oy-button--publish[disabled] {
  background: rgba(26, 26, 24, 0.25);
  border-color: rgba(26, 26, 24, 0.25);
  cursor: not-allowed;
}

/* Privacy rail ───────────────────────────────────────── */

.oy-privacy-rail {
  border: 1px solid var(--oy-ink);
  padding: 16px;
  margin-top: 32px;
  font-size: 13px;
}

.oy-privacy-rail__title {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 8px;
  margin: 0 0 12px 0;
}

.oy-privacy-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oy-privacy-rail__help {
  margin-top: 16px;
  font-size: 12px;
  color: rgba(26, 26, 24, 0.7);
  font-style: italic;
}

/* Privacy summary list (Step 05) ─────────────────────── */

.oy-privacy-summary {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oy-privacy-summary__item {
  border: 1px solid var(--oy-ink);
  padding: 8px 12px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.oy-privacy-summary__item--dropped { background: rgba(139, 26, 26, 0.06); }
.oy-privacy-summary__item--review  { background: rgba(201, 139, 27, 0.10); }

/* Summary card (Step 06) ─────────────────────────────── */

.oy-summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  border: 1px solid var(--oy-ink);
  padding: 16px 20px;
  margin: 16px 0 24px 0;
}

.oy-summary dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(26, 26, 24, 0.7);
}

.oy-summary dd { margin: 0; }

/* Override request collapse ─────────────────────────── */

.oy-override {
  margin-top: 32px;
  border-top: 1px dashed var(--oy-ink);
  padding-top: 16px;
}

.oy-override summary {
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
}

/* Source card (Step 01) ─────────────────────────────── */

.oy-source-card {
  border: 1px solid var(--oy-ink);
  padding: 12px 16px;
  margin: 16px 0;
}

.oy-source-card__eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 4px 0;
  color: rgba(26, 26, 24, 0.6);
}

.oy-source-card__name {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 8px 0;
}

.oy-source-card__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 0;
  font-size: 13px;
}

/* Request-access surface (overridden /user/register) ── */

.oy-request-access { max-width: 600px; padding: 32px 24px; }
.oy-request-access h1 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  margin: 0 0 12px 0;
}

.oy-request-access__contact {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
}

.oy-request-access__login {
  margin-top: 32px;
  border-top: 1px solid var(--oy-ink);
  padding-top: 16px;
}

/* Dashboard (US2) ─────────────────────────────────────── */

.oy-dash {
  max-width: 960px;
  padding: 32px 24px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--oy-ink);
}

.oy-dash__header {
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 16px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.oy-dash__title {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 32px;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.oy-dash__lead {
  font-size: 14px;
  color: rgba(26, 26, 24, 0.75);
  margin: 0;
}

.oy-dash__section { margin-bottom: 32px; }

.oy-dash__heading {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 6px;
  margin: 0 0 12px 0;
}

.oy-dash__empty {
  font-size: 13px;
  color: rgba(26, 26, 24, 0.6);
  font-style: italic;
}

.oy-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.oy-card {
  border: 1px solid var(--line);
  border-top: none;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--oy-paper);
}

.oy-card-list .oy-card:first-child { border-top: 1px solid var(--line); }

.oy-card--pending  { background: rgba(201, 139, 27, 0.08); }
.oy-card--rejected { background: rgba(139, 26, 26, 0.06); }
.oy-card--expired  { background: rgba(26, 26, 24, 0.05); }
.oy-card--retired  { background: rgba(26, 26, 24, 0.03); opacity: 0.85; }

.oy-card__eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 2px 0;
  color: rgba(26, 26, 24, 0.65);
}

.oy-card__title {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.oy-card__title a { color: var(--oy-ink); text-decoration: underline; }

.oy-card__meta {
  font-size: 12px;
  color: rgba(26, 26, 24, 0.65);
  margin: 4px 0 0 0;
}

.oy-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.oy-button--danger {
  background: var(--oy-block);
  border-color: var(--oy-block);
  color: var(--oy-paper);
}

.oy-button--danger:hover {
  background: var(--oy-ink);
  border-color: var(--oy-ink);
}

/* Edit + audit sidebar */

.oy-edit { max-width: 760px; padding: 32px 24px; }

.oy-edit__header {
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.oy-edit__eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  margin: 0 0 8px 0;
}

.oy-edit__title {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 28px;
  margin: 0;
}

.oy-audit {
  border: 1px solid var(--oy-ink);
  padding: 16px;
  margin-top: 32px;
}

.oy-audit__title {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 4px;
  margin: 0 0 12px 0;
}

.oy-audit__list { list-style: none; padding: 0; margin: 0; }

.oy-audit__row {
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(26, 26, 24, 0.1);
}

.oy-audit__when {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  margin: 0;
  color: rgba(26, 26, 24, 0.6);
}

.oy-audit__what { margin: 2px 0 0 0; font-size: 13px; }
.oy-audit__empty { font-size: 12px; color: rgba(26, 26, 24, 0.6); }

/* OCC conflict diff table */
.oy-occ-diff {
  width: 100%;
  border: 1px solid var(--oy-ink);
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}
.oy-occ-diff th, .oy-occ-diff td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(26, 26, 24, 0.15);
  text-align: left;
  vertical-align: top;
}
.oy-occ-diff th {
  background: rgba(139, 26, 26, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Mobile interstitial (≤768 px) ─────────────────────────── */

.oy-mobile-interstitial {
  display: none;
  border: 1px solid var(--oy-ink);
  background: rgba(201, 139, 27, 0.10);
  padding: 24px;
  margin: 16px 0 24px 0;
  font-size: 14px;
  line-height: 1.5;
}

.oy-mobile-interstitial h2 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 20px;
  margin: 0 0 8px 0;
}

.oy-mobile-interstitial__copy {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  word-break: break-all;
  background: rgba(26, 26, 24, 0.05);
  padding: 8px;
  border: 1px dashed rgba(26, 26, 24, 0.3);
}

/* Accessibility — keyboard focus states (SC-006) ─────────── */

.oy-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--oy-rust, #b04a2e);
  outline-offset: 2px;
}

/* Mobile reflow (≤ 768 px) ─────────────────────────────── */

@media (max-width: 768px) {
  .oy-stepper { grid-template-columns: repeat(3, 1fr); }
  .oy-stepper__step:nth-child(3) { border-right: none; }
  .oy-stepper__step { border-bottom: 1px solid var(--oy-ink); }
  .oy-stepper__step:nth-last-child(-n+3) { border-bottom: none; }
  .oy-form__actions { flex-direction: column; align-items: stretch; }
  .oy-button { text-align: center; }

  /* Dashboard cards stack vertically with action row below. */
  .oy-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .oy-card__actions { justify-content: flex-start; }

  /* Wizard surfaces hide the step body; everywhere else (dashboard,
     team) keeps reflowing inline. */
  .oy-wizard .oy-wizard__body { display: none; }
  .oy-wizard .oy-mobile-interstitial { display: block; }
}

/* Team view (US3) ─────────────────────────────────────── */

.oy-team { max-width: 960px; padding: 32px 24px; }

.oy-team__header {
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.oy-team__eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  margin: 0 0 6px 0;
}

.oy-team__title {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 28px;
  margin: 0 0 4px 0;
}

.oy-team__lead {
  font-size: 14px;
  color: rgba(26, 26, 24, 0.75);
  margin: 0;
}

.oy-team__section { margin-bottom: 32px; }

.oy-team__heading {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--oy-ink);
  padding-bottom: 6px;
  margin: 0 0 12px 0;
}

.oy-team-table {
  width: 100%;
  border: 1px solid var(--oy-ink);
  border-collapse: collapse;
  margin: 8px 0 16px 0;
  font-size: 14px;
}

.oy-team-table th, .oy-team-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(26, 26, 24, 0.15);
  text-align: left;
  vertical-align: middle;
}

.oy-team-table th {
  background: rgba(26, 26, 24, 0.05);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.oy-mono { font-family: "JetBrains Mono", monospace; font-size: 12px; }

.oy-form--inline {
  display: grid;
  grid-template-columns: 1fr 200px auto;
  gap: 12px;
  align-items: end;
}

.oy-form--row {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.oy-form--row select { padding: 4px 6px; }

/* Invite-accept page */

.oy-invite {
  max-width: 560px;
  padding: 32px 24px;
}

.oy-invite__title {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 28px;
  margin: 0 0 12px 0;
}

.oy-invite__lead { font-size: 16px; line-height: 1.5; }

.oy-invite__meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: rgba(26, 26, 24, 0.6);
}

.oy-invite__create {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--oy-ink);
}

.oy-invite__signin {
  margin-top: 24px;
  font-size: 13px;
  color: rgba(26, 26, 24, 0.7);
}

.oy-dash__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .oy-form--inline { grid-template-columns: 1fr; }
}

/* ── Suspended-org publishing interstitial (003-stewardship-surface) ── */
/* This page renders under /publish/new when the wizard refuses a draft
 * for a suspended org. publishing.css is the right bundle home — the
 * steward bundle isn't loaded on /publish/*. */
.org-suspended {
  max-width: 540px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}
.org-suspended__card {
  border: 1px solid var(--ink, #1d1d1b);
  border-left: 4px solid #9b2010;
  padding: 2rem;
  background: var(--paper, #f6f3eb);
}
.org-suspended__card h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  margin-top: 0;
}
