/* Parrhesia — shared stylesheet */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #141414;
  --ink-2: #3d3d3a;
  --muted: #6b6a65;
  --line: #e4e2dc;
  --line-strong: #cfccc4;
  --accent: #1f3b73;
  --accent-ink: #ffffff;
  --accent-soft: #eef1f7;
  --ok: #24613f;
  --ok-soft: #eef5f0;
  --danger: #9b2c1f;
  --danger-soft: #f8eeec;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;

  --radius: 4px;
  --wrap: 1120px;
  --narrow: 640px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--ink); color: #fff; padding: 8px 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

[hidden] { display: none !important; }

/* Layout */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-tight { padding: 64px 0; }

.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }

/* Typography */

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.display .quiet { color: var(--muted); }

.h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.015em; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.01em; }
.h3 { font-size: 18px; }

.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Header / navigation */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 24px;
}

.brand {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand::after {
  content: ""; width: 6px; height: 6px; background: var(--accent);
  display: inline-block; margin-left: 2px;
}

.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .nav-login {
  color: var(--ink); border: 1px solid var(--line-strong);
  padding: 7px 14px; border-radius: var(--radius);
}
.nav .nav-login:hover { border-color: var(--ink); text-decoration: none; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-size: 16px; font-weight: 500;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2e2e2c; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #172d59; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: #dcb7b1; }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */

.hero { padding: 120px 0 104px; }
.hero .display { max-width: 15em; }
.hero .lead { margin-top: 28px; }
.hero .btn-row { margin-top: 40px; }

/* How it works */

.section-head { display: grid; gap: 12px; margin-bottom: 56px; max-width: 40em; }

.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  counter-reset: step;
}
.steps li {
  list-style: none; padding: 28px 28px 8px 0;
}
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.steps h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 10px 0 12px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* Principles */

.principles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  margin: 0; padding: 0;
}
.principles li {
  list-style: none; padding: 28px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.principles h3 { font-size: 18px; margin-bottom: 6px; }
.principles p { color: var(--muted); font-size: 15px; }

.boundaries { margin-top: 48px; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.boundaries ul { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.boundaries li {
  list-style: none; font-size: 14px; color: var(--ink-2);
  border: 1px solid var(--line); padding: 4px 10px; border-radius: 2px;
}
.boundaries li::before { content: "No "; color: var(--muted); }

/* Pricing */

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
.price-figure { font-family: var(--serif); font-size: clamp(96px, 14vw, 168px); line-height: .9; letter-spacing: -0.04em; }
.price-unit { font-size: 20px; color: var(--ink-2); margin-top: 12px; }
.price-list { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.price-list li {
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.price-list li span:last-child { font-family: var(--mono); font-size: 15px; }

/* CTA */

.cta {
  background: var(--ink); color: #fff;
  padding: 96px 0;
}
.cta .h1 { max-width: 16em; }
.cta p { color: #bdbcb7; margin-top: 16px; }
.cta .btn-row { margin-top: 36px; }
.cta .btn-primary { background: #fff; color: var(--ink); }
.cta .btn-primary:hover { background: #e9e7e1; }
.cta .btn-secondary { color: #fff; border-color: #5a5a57; }
.cta .btn-secondary:hover { border-color: #fff; }
.cta :focus-visible { outline-color: #fff; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap, .site-footer .wrap-narrow {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--ink-2); }

/* Forms */

.field { display: grid; gap: 8px; }
.field + .field { margin-top: 28px; }
.label { font-weight: 600; font-size: 16px; }
.hint { font-size: 14px; color: var(--muted); }

.input, .textarea {
  width: 100%;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input { min-height: 48px; }
.textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.input:hover, .textarea:hover { border-color: #a9a69d; }
.input:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 59, 115, .15);
}
.input::placeholder, .textarea::placeholder { color: #8f8d86; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }

.error { color: var(--danger); font-size: 14px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }

.choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; background: var(--surface); cursor: pointer;
}
.choice:hover { border-color: #a9a69d; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}

.price-readout {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0; margin-top: 28px;
}
.price-readout strong { font-family: var(--serif); font-weight: 500; font-size: 32px; }

.link-box {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); padding: 6px 6px 6px 16px;
}
.link-box code { font-family: var(--mono); font-size: 16px; flex: 1; overflow-wrap: anywhere; }

.status-line { font-size: 14px; color: var(--ok); min-height: 1.4em; }

/* Page header (app pages) */

.page-head { padding: 64px 0 40px; }
.page-head .lead { margin-top: 16px; }

/* Employee feedback page */

.fb-header { border-bottom: 1px solid var(--line); }
.fb-header .wrap-narrow { padding-top: 28px; padding-bottom: 28px; }
.company {
  font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: .02em;
}
.fb-intro { padding: 40px 0 8px; }
.fb-intro h1 { font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fb-intro .lead { margin-top: 12px; color: var(--ink); font-family: var(--serif); font-size: clamp(24px, 4vw, 30px); line-height: 1.25; }

.assurances { margin: 24px 0 0; padding: 0; display: grid; gap: 6px; }
.assurances li { list-style: none; font-size: 15px; color: var(--ink-2); padding-left: 20px; position: relative; }
.assurances li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 8px; height: 1px; background: var(--ink-2);
}

.fb-step { padding: 40px 0 72px; }
.step-indicator { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.fb-step .label { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.25; }
.fb-step .textarea { min-height: 220px; margin-top: 8px; }
.fb-actions { display: flex; gap: 12px; margin-top: 24px; }
.fb-actions .btn { flex: 0 0 auto; }

.quote {
  border-left: 2px solid var(--line-strong);
  padding: 4px 0 4px 16px; margin-bottom: 32px;
}
.quote .eyebrow { font-size: 12px; }
.quote p {
  margin-top: 6px; color: var(--ink-2); font-size: 16px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-line;
}

.anon-preview {
  margin: 28px 0 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.anon-preview dt {
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.anon-preview dd { margin: 6px 0 0; font-size: 17px; white-space: pre-line; }
.anon-preview dd + dt { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

.checking { display: flex; align-items: center; gap: 14px; padding: 72px 0; font-size: 18px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--ink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.done { padding: 72px 0 96px; }
.done .h1 { margin-bottom: 16px; }
.done-mark {
  width: 40px; height: 40px; border: 1px solid var(--ok); color: var(--ok);
  display: grid; place-items: center; border-radius: 50%; margin-bottom: 28px; font-size: 18px;
}

/* Dashboard */

.app-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.app-bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.app-bar-left { display: flex; align-items: center; gap: 16px; }
.app-bar .divider { width: 1px; height: 20px; background: var(--line-strong); }
.app-bar .org { font-size: 15px; color: var(--ink-2); }
.app-bar-right { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.app-bar-right a { color: var(--ink-2); }
.link-btn {
  font: inherit; color: var(--ink-2); background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--ink); text-decoration-thickness: 2px; }

.tag-internal {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--danger); border: 1px solid #dcb7b1; padding: 2px 8px; border-radius: 2px;
}

.dash { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding: 48px 0 96px; }
.dash-side { position: sticky; top: 24px; align-self: start; }
.dash-side .eyebrow { margin-bottom: 12px; }
.dash-side + .dash-side { margin-top: 32px; }

.filters { display: grid; gap: 2px; margin: 0; padding: 0; }
.filters li { list-style: none; }
.filter-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  font: inherit; font-size: 15px; color: var(--ink-2); text-align: left;
  background: transparent; border: 0; border-radius: var(--radius);
  padding: 9px 12px; cursor: pointer; min-height: 40px;
}
.filter-btn:hover { background: #f1efea; color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.filter-btn .count { font-family: var(--mono); font-size: 13px; opacity: .7; }

.select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  min-height: 42px; padding: 0 12px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}

.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.dash-head .h1 { line-height: 1; }
.result-count { font-size: 15px; color: var(--muted); }

.feed { margin: 0; padding: 0; }
.feed-item { list-style: none; padding: 32px 0; border-bottom: 1px solid var(--line); }
.feed-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.cat {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 2px;
}
.feed-body { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.feed-body h3 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.feed-body p { font-size: 17px; }
.feed-body .critique p { font-family: var(--serif); font-size: 20px; line-height: 1.4; }
.feed-body .suggestion { border-left: 1px solid var(--line); padding-left: 40px; }

.empty { padding: 64px 0; color: var(--muted); }

/* Moderation */

.queue { margin: 0; padding: 0; }
.queue-item {
  list-style: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; margin-bottom: 20px;
}
.queue-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.queue-meta strong { color: var(--ink); font-weight: 600; }
.flag {
  background: var(--danger-soft); color: var(--danger);
  border-left: 2px solid var(--danger);
  padding: 10px 14px; font-size: 15px; margin-bottom: 24px;
}
.flag b { font-weight: 600; }
.queue-item .feed-body { margin-bottom: 28px; }
.queue-item .feed-body .critique p { font-size: 18px; }
.queue-result {
  padding: 18px 20px; border-radius: var(--radius); font-size: 16px;
}
.queue-result.ok { background: var(--ok-soft); color: var(--ok); }
.queue-result.deleted { background: #f1efea; color: var(--ink-2); }

/* Auth */

.auth { display: grid; place-items: center; padding: 96px 24px; }
.auth .panel { width: 100%; max-width: 440px; }
.auth .h2 { margin-bottom: 10px; }
.auth form { margin-top: 32px; }
.auth .btn { width: 100%; margin-top: 32px; }
.auth-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Privacy */

.claims { margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.claims li {
  list-style: none; display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.claims h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; }
.claims p { color: var(--ink-2); }

.data-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.data-table th, .data-table td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.name-note { border-left: 2px solid var(--accent); padding-left: 20px; max-width: 40em; }
.name-note p + p { margin-top: 10px; }

/* Responsive */

@media (max-width: 1024px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
  .dash { grid-template-columns: 1fr; gap: 32px; }
  .dash-side { position: static; }
  .dash-aside { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: start; }
  .dash-side + .dash-side { margin-top: 0; }
  .filters { display: flex; flex-wrap: wrap; gap: 6px; }
  .filter-btn { width: auto; border: 1px solid var(--line-strong); gap: 8px; }
  .filter-btn[aria-pressed="true"] { border-color: var(--ink); }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
  .principles { grid-template-columns: 1fr 1fr; }
  .pricing, .boundaries { grid-template-columns: 1fr; gap: 32px; }
  .feed-body { grid-template-columns: 1fr; gap: 20px; }
  .feed-body .suggestion { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); padding-top: 20px; }
  .claims li { grid-template-columns: 1fr; gap: 8px; }
  .panel { padding: 28px 22px; }
  .dash-aside { grid-template-columns: 1fr; }
  .queue-item { padding: 24px 20px; }
}

@media (max-width: 640px) {
  .nav a:not(.nav-login) { display: none; }
  .wrap, .wrap-narrow { padding: 0 20px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 4px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); margin-top: 16px; }
  .principles { grid-template-columns: 1fr; }
  .principles li { padding: 22px 20px; }
  .choice-group { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .fb-actions .btn-accent, .fb-actions .btn-primary { flex: 1; }
  .app-bar .org, .app-bar .divider { display: none; }
  .dash-head { flex-direction: column; align-items: start; }
  .queue-actions .btn { flex: 1 1 100%; }
  .link-box { flex-direction: column; align-items: stretch; padding: 12px; }
  .data-table th:nth-child(3), .data-table td:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 2s; }
  * { transition: none !important; }
}
