@font-face {
  font-family: "Astral Serif";
  src: url("../../assets/AstralSerif-Subset.otf") format("opentype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #071012;
  --panel: #101d20;
  --panel-strong: #17282b;
  --text: #eef6f3;
  --muted: #b8c8c7;
  --mint: #a9eee5;
  --mint-soft: #d9fff9;
  --amber: #ffc46b;
  --line: #496466;
  --field: #f5faf8;
  --field-text: #0b1719;
  --danger: #ffb6a5;
  --feedback-option-bg: #101f22;
  --feedback-option-text: #eef6f3;
  --feedback-option-hover-bg: #172b2e;
  --feedback-option-selected-bg: #322718;
  --feedback-option-selected-text: #ffe8c4;
  --feedback-option-disabled-bg: #15272a;
  --feedback-option-disabled-text: #dbe8e6;
  --feedback-other-bg: #17150f;
  --feedback-other-border: #79613a;
  --feedback-other-heading: #ffe8c4;
  --feedback-other-copy: #b8c8c7;
}

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

html {
  min-width: 320px;
  background: #030708;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(169, 238, 229, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 238, 229, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 84% 12%, rgba(255, 196, 107, 0.12), transparent 34rem),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto, auto;
  color: var(--text);
  font-family: Inter, "Helvetica Neue", Arial, "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--mint-soft);
  color: #051012;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 18, 0.95);
  backdrop-filter: blur(14px);
}

.authority {
  display: grid;
  text-decoration: none;
}

.authority span {
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.authority strong {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  letter-spacing: 0.08em;
}

.site-header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-header nav a,
footer nav a {
  padding: 7px 10px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
footer nav a:hover,
footer nav a:focus-visible {
  border-color: var(--line);
  color: var(--mint-soft);
}

main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(54px, 9vw, 104px) 0 100px;
}

.intro { max-width: 790px; }

.eyebrow,
.section-heading > p {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.state-mark {
  display: inline-flex;
  margin: 10px 0 18px;
  padding: 5px 10px;
  border: 1px solid #a9772f;
  background: #362714;
  color: #ffe2b1;
  font-size: 0.875rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Astral Serif", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 900;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.intro > p:last-child {
  max-width: 750px;
  margin: 28px 0 0;
  color: var(--muted);
}

.panel {
  margin-top: 46px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  background: rgba(16, 29, 32, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.feedback-guardrails {
  margin-top: 38px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid #79613a;
  background: rgba(37, 29, 18, 0.92);
}

.feedback-guardrails .section-heading h2 { font-size: clamp(1.65rem, 4vw, 2.6rem); }

.guardrail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.guardrail-grid article {
  padding: 18px;
  border: 1px solid #685a42;
  background: #10191a;
}

.guardrail-grid strong { color: #ffe2b1; }
.guardrail-grid p { margin: 7px 0 0; color: var(--muted); font-size: 0.925rem; }

.section-heading h2 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.12;
}

.panel-lead,
.minor-note,
.request-card p,
.submit-row p { color: var(--muted); }

.login-panel form {
  display: grid;
  gap: 10px;
  max-width: 610px;
  margin-top: 28px;
}

label {
  margin-top: 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 0;
  background: var(--field);
  color: var(--field-text);
  font-size: 1rem;
  line-height: 1.65;
}

input { min-height: 50px; padding: 10px 13px; }
textarea { min-height: 170px; padding: 13px 14px; resize: vertical; }

input:focus,
textarea:focus {
  border-color: var(--amber);
  outline: 3px solid rgba(255, 196, 107, 0.2);
}

button {
  min-height: 48px;
  border: 1px solid var(--mint);
  border-radius: 0;
  background: var(--mint-soft);
  color: #071214;
  cursor: pointer;
  font-weight: 900;
}

button:hover { background: #ffffff; }
button:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
button:disabled {
  border-color: #6f8384;
  background: #334548;
  color: #e7efee;
  cursor: wait;
}

.login-panel button {
  width: fit-content;
  margin-top: 14px;
  padding: 10px 22px;
}

.form-message {
  min-height: 1.75em;
  margin: 16px 0 0;
  color: var(--mint-soft);
  font-weight: 700;
}

.form-message[data-error="true"] { color: var(--danger); }
.minor-note { margin-bottom: 0; font-size: 0.875rem; }

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 46px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.account-bar > div { display: grid; min-width: 0; gap: 5px; }
.account-bar span { color: var(--mint); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.15em; }
.account-bar strong { overflow-wrap: anywhere; font-size: 1.1rem; }
.account-bar small { color: var(--muted); }
.entry-picker { display: grid; gap: 4px; margin-top: 8px; color: var(--muted); font-size: 0.8rem; }
.entry-picker select { min-height: 42px; max-width: min(100%, 34rem); border: 1px solid var(--line); background: #071012; color: var(--text); padding: 8px 10px; font: inherit; }
.minor-note a { color: var(--mint-soft); text-underline-offset: 3px; }

.quiet-button {
  min-height: 42px;
  padding: 7px 14px;
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.quiet-button:hover { background: #243639; }
.portal .panel { margin-top: 14px; }

.cycle-state {
  margin: 26px 0 0;
  padding: 16px 18px;
  border-left: 4px solid var(--amber);
  background: #251d12;
  color: #ffe8c4;
}

.feedback-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.feedback-steps li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #a6b1ae;
  background: #f7faf8;
  color: #435557;
}

.feedback-steps li > span {
  color: #526266;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 900;
}

.feedback-steps li > strong { font-size: 0.9rem; }

.feedback-steps li.is-current {
  border-color: #17606a;
  background: #e4f0ec;
  color: #123f46;
  box-shadow: inset 0 -3px 0 #17606a;
}

.feedback-steps li.is-current > span { color: #17606a; }

#feedback-form { margin-top: 28px; }

.request-card {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  background: #0b1618;
}

.request-card--meta { border-color: #79613a; }
.request-number { color: var(--amber); font-family: "Astral Serif", sans-serif; font-size: 1.7rem; }
.request-card label { margin: 0; }
.request-card p { margin: 5px 0 14px; }
.counter { display: block; margin-top: 7px; color: var(--muted); font-size: 0.875rem; text-align: right; }
.counter[data-over-limit="true"] { color: var(--danger); font-weight: 800; }

.rating-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.rating-fieldset legend {
  padding: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rating-option {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: var(--feedback-option-bg);
  color: var(--feedback-option-text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
}

.rating-option:hover,
.rating-option:focus-within {
  border-color: var(--mint);
  background: var(--feedback-option-hover-bg);
}

.rating-option:has(input:checked) {
  border-color: var(--amber);
  background: var(--feedback-option-selected-bg);
  color: var(--feedback-option-selected-text);
  box-shadow: inset 0 0 0 1px var(--amber);
}

.rating-option input[type="radio"] {
  width: 1.1rem;
  min-height: 1.1rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  accent-color: var(--amber);
}

.rating-option input[type="radio"]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.rating-option:has(input:disabled) {
  border-color: #5b7375;
  background: var(--feedback-option-disabled-bg);
  color: var(--feedback-option-disabled-text);
  cursor: default;
}

.other-field {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--feedback-other-border);
  background: var(--feedback-other-bg);
}

.other-field label {
  display: block;
  color: var(--feedback-other-heading);
  font-size: 1rem;
  font-weight: 800;
}

.other-field :is(p, small, .counter) { color: var(--feedback-other-copy); }
.other-field label small { font-weight: 500; }
.other-field p { margin-bottom: 10px; font-size: 0.9rem; }
.other-field .counter[data-over-limit="true"] { color: var(--danger); }
.other-field textarea { min-height: 140px; }

.seed-note {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid #4d7773;
  background: #102421;
}

.seed-note strong { color: var(--mint-soft); }
.seed-note p { margin: 7px 0 0; color: #cce0dc; }

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

.submit-row p { max-width: 610px; margin: 0; font-size: 0.9rem; }
.submit-row button { flex: 0 0 auto; padding: 10px 22px; }

.feedback-preview {
  margin-top: 28px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid #9eb1ae;
  background: #fffdf8;
  color: #172729;
  box-shadow: 0 18px 48px rgba(28, 48, 48, 0.12);
}

.feedback-preview:focus-visible {
  outline: 3px solid #a9772f;
  outline-offset: 4px;
}

.feedback-preview__eyebrow {
  margin: 0 0 6px;
  color: #17606a !important;
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.feedback-preview h3 {
  margin: 0;
  color: #163f46 !important;
  font-family: "Astral Serif", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.65rem, 4vw, 2.6rem);
}

.feedback-preview__lead {
  margin: 10px 0 0;
  color: #526266 !important;
}

.feedback-preview__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.feedback-preview__meta > div {
  padding: 13px 15px;
  border: 1px solid #c7d0cd;
  background: #edf3f0;
}

.feedback-preview__meta dt {
  color: #526266;
  font-size: 0.76rem;
  font-weight: 800;
}

.feedback-preview__meta dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #172729;
  font-weight: 900;
}

.feedback-preview__items {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.feedback-preview__items article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 17px;
  border: 1px solid #c7d0cd;
  background: #f7faf8;
}

.feedback-preview__items article > span {
  color: #a15b18 !important;
  font-family: ui-monospace, monospace;
  font-weight: 900;
}

.feedback-preview__items h4 {
  margin: 0;
  color: #172729 !important;
  font-size: 1rem;
}

.feedback-preview__items p {
  margin: 5px 0 0;
  color: #435557 !important;
}

.feedback-preview__items b { color: #123f46; }

.feedback-preview__other {
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 4px solid #a9772f;
  background: #fff3dc;
  color: #4b3216;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.feedback-preview__warning {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #c7a56e;
  background: #fff3dc;
  color: #5d3b12 !important;
  font-weight: 800;
}

.feedback-preview__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.feedback-preview__actions button { padding: 10px 20px; }
.feedback-preview__actions .quiet-button { border-color: #71817d; color: #294246; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #050b0d;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .site-header { position: static; align-items: flex-start; }
  .site-header nav { display: none; }
  main { width: min(100% - 22px, 960px); padding-top: 42px; }
  .panel { padding: 22px 17px; }
  .guardrail-grid { grid-template-columns: 1fr; }
  .request-card { grid-template-columns: 1fr; gap: 4px; }
  .request-number { font-size: 1.2rem; }
  .rating-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other-field { padding: 15px; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .submit-row button { width: 100%; }
  .feedback-steps { grid-template-columns: 1fr; }
  .feedback-preview__meta { grid-template-columns: 1fr; }
  .feedback-preview__items article { grid-template-columns: 34px minmax(0, 1fr); }
  .feedback-preview__actions { align-items: stretch; flex-direction: column; }
  .feedback-preview__actions button { width: 100%; }
  .account-bar { align-items: stretch; flex-direction: column; }
  .quiet-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
