:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --text: #18312c;
  --muted: #5d6f6a;
  --line: #dbe4e0;
  --primary: #04243D;
  --primary-dark: #004b3f;
  --accent: #FF3511;
  --danger: #a63d40;
  --shadow: 0 18px 40px rgba(24, 49, 44, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 0 48px;
  background: #fff;
  border-bottom: 1px solid #dbe4e0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 73px;
  height: auto;
}

.brand-copy {
  border-left: 1px solid #dbe4e0;
  padding-left: 12px;
}

.brand-copy small {
  display: block;
  color: #5d6f6a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #5d6f6a;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: #e12200;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--primary);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.hero {
  min-height: 788px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 64px;
  padding: 80px 64px;
  background: #f6f8f7;
  color: #04243D;
}

.hero-copy {
  display: grid;
  gap: 32px;
  justify-items: center;
  width: 100%;
  max-width: 1312px;
  text-align: center;
}

.hero h1 {
  max-width: 1156px;
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 5.125rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-align: center;
}

.hero p {
  max-width: 744px;
  color: #04243D;
  font-size: 1.25rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #04243D;
}

.hero-actions,
.form-grid,
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 16px;
  justify-content: center;
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  width: 223px;
  min-height: 50px;
  padding: 14px 24px;
  font-size: 1.12rem;
}

.hero-actions .primary-button {
  color: #fff;
  background: #04243D;
}

.hero-actions .primary-button:hover,
.hero-actions .primary-button:focus {
  color: #fff;
  background: #001c33;
}

.hero-actions .secondary-button {
  color: #04243D;
  border-color: #04243D;
  background: transparent;
}

.hero-actions .secondary-button:hover,
.hero-actions .secondary-button:focus {
  color: #fff;
  background: #04243D;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover,
.primary-button:focus {
  background: var(--primary-dark);
}

.secondary-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button {
  min-height: 40px;
  border-color: #e5e7eb;
  border-radius: 10px;
  padding: 10px 20px;
  color: #111827;
  background: #fff;
  font-size: 0.94rem;
  font-weight: 800;
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: min(752px, 100%);
  padding: 32px;
  border-radius: 24px;
  background: #04243D;
  box-shadow: 0 28px 54px rgba(4, 36, 61, 0.22);
}

.hero-panel div {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel strong {
  display: block;
  color: #fff;
  font-size: 3.5rem;
  line-height: 1;
}

.hero-panel span {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.how-it-works {
  display: grid;
  gap: 80px;
  padding: 120px clamp(24px, 11vw, 160px);
  background: #fff;
}

.how-heading {
  display: grid;
  gap: 16px;
  text-align: center;
}

.how-heading .eyebrow {
  margin: 0;
  color: #ff3511;
}

.how-heading h2 {
  margin: 0;
  color: #04243D;
  font-size: clamp(2.4rem, 5vw, 3rem);
  line-height: 1.1;
}

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

.step-card {
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
}

.step-icon {
  width: 64px;
  height: 64px;
}

.step-card h3 {
  margin: 0;
  color: #04243D;
  font-size: 1.5rem;
}

.step-card p {
  margin: -12px 0 0;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
}

.section {
  padding: clamp(44px, 7vw, 88px) clamp(16px, 5vw, 64px);
}

.page-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 171px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.page-section .section-heading {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.section-heading p:last-child {
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-panel.wide {
  width: min(100%, 980px);
  max-width: 980px;
}

.flag-page #flag {
  align-items: center;
  gap: 32px;
  min-height: auto;
  padding: 80px 24px 120px;
}

.flag-page #flag .section-heading,
.flag-page #issueForm,
.flag-page .form-note {
  width: min(100%, 760px);
  max-width: 760px;
}

.flag-page #flag .section-heading {
  margin: 0;
  text-align: left;
}

.flag-page #flag .eyebrow {
  margin-bottom: 20px;
  color: #e12200;
  font-size: 0.75rem;
  letter-spacing: 0;
}

.flag-page #flag .section-heading h1 {
  color: #111827;
  font-size: clamp(2.6rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.flag-page #flag .section-heading p:last-child {
  margin-top: 20px;
  color: #4b5563;
  font-size: 1.12rem;
  line-height: 1.6;
}

.flag-page #issueForm {
  gap: 24px;
  padding: 32px;
  border-color: #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.flag-page #issueForm label {
  gap: 10px;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 800;
}

.optional-label {
  color: #4b5563;
  font-weight: 400;
}

.flag-page #issueForm input,
.flag-page #issueForm select,
.flag-page #issueForm textarea {
  min-height: 48px;
  border-color: #d1d5db;
  border-radius: 10px;
  padding: 14px 16px;
  color: #111827;
  font-size: 0.94rem;
}

.flag-page #issueForm textarea {
  min-height: 120px;
}

.flag-page #issueForm input::placeholder,
.flag-page #issueForm textarea::placeholder {
  color: #4b5563;
}

.flag-page #issueForm input[type="file"] {
  min-height: 0;
  border: 0;
  padding: 0;
  color: #4b5563;
  background: transparent;
  font-size: 0.88rem;
}

.flag-page #issueForm input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 16px;
  color: #04243D;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.flag-page #issueForm .primary-button {
  min-height: 48px;
  border-radius: 10px;
  color: #fff;
  background: #111827;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.flag-page #issueForm .primary-button:hover,
.flag-page #issueForm .primary-button:focus {
  background: #04243D;
}

.form-note {
  width: min(100%, 980px);
  max-width: 980px;
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.flag-page .form-note {
  margin: 0;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
}

.flag-page .form-note strong {
  color: inherit;
  font-weight: 800;
}

.flag-page .form-note strong:nth-of-type(2) {
  color: #e12200;
}

.flag-page #flag.issue-submitted-state {
  gap: 48px;
  padding-top: 80px;
}

.confirmation-card {
  display: grid;
  gap: 32px;
  width: min(100%, 760px);
  max-width: 760px;
  padding: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.confirmation-heading {
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
}

.confirmation-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #dcfce7;
  border-radius: 50%;
  color: #10b981;
  background: #f0fdf4;
}

.confirmation-icon svg {
  width: 32px;
  height: 32px;
}

.confirmation-heading .eyebrow {
  margin: 0 0 8px;
  color: #e12200;
  font-size: 0.7rem;
  letter-spacing: 0;
}

.confirmation-heading h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.9rem, 4vw, 2rem);
  line-height: 1.2;
}

.confirmation-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
}

.submission-summary {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.submission-summary div {
  display: grid;
  gap: 4px;
}

.submission-summary dt {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 800;
}

.submission-summary dd {
  margin: 0;
  color: #111827;
  font-size: 0.94rem;
  line-height: 1.6;
}

.confirmation-actions {
  display: grid;
  gap: 12px;
}

.confirmation-actions .primary-button,
.confirmation-actions .ghost-button {
  min-height: 49px;
  border-radius: 10px;
  font-size: 0.94rem;
}

.confirmation-actions .primary-button {
  color: #fff;
  background: #111827;
}

.confirmation-actions .primary-button:hover,
.confirmation-actions .primary-button:focus {
  background: #04243D;
}

.confirmation-actions .ghost-button {
  border-color: #d1d5db;
  color: #111827;
  background: #fff;
}

.submission-note {
  width: min(100%, 760px);
  max-width: 760px;
  margin: -30px 0 0;
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.4;
}

.submission-note strong {
  color: #111827;
}

.auth-panel {
  width: min(100%, 560px);
  max-width: 560px;
}

.form-panel h3 {
  margin: 0;
  font-size: 1.35rem;
}

.form-panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.admin-login {
  max-width: 520px;
  margin-top: 18px;
}

.auth-link {
  margin: 0;
  color: var(--muted);
}

.auth-link a {
  color: var(--primary);
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bdcbc6;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  font-weight: 400;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-weight: 400;
  opacity: 1;
}

.form-panel select:required:invalid,
.form-panel input[type="file"] {
  color: var(--muted);
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 3px solid rgba(240, 180, 41, 0.55);
  outline-offset: 2px;
}

.form-grid label {
  min-width: min(100%, 260px);
  flex: 1;
}

.notice {
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 13px 14px;
  color: #4b3b07;
  background: #fff6d8;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(17, 24, 39, 0.56);
}

.modal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 480px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-panel h2,
.modal-panel h1,
.modal-panel p {
  margin: 0;
}

.modal-panel h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.12;
}

.modal-panel p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.admin-hint {
  color: var(--muted);
  margin: 0;
}

.filters {
  align-items: center;
  margin-bottom: 18px;
}

#dashboard .filters,
#dashboard .issue-list {
  width: 100%;
}

#dashboard .section-heading {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

#dashboard .filters {
  justify-content: flex-start;
}

#dashboard .filters > * {
  flex: 0 1 auto;
  width: auto;
  min-width: 220px;
}

#dashboard #websiteFilter {
  min-width: 280px;
}

.dashboard-page {
  background: #f9fafb;
  color: #111827;
}

.dashboard-page #dashboard {
  align-items: flex-start;
  width: min(100%, 1040px);
  min-height: auto;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

.dashboard-page #dashboard .section-heading {
  margin-bottom: 32px;
}

.dashboard-page #dashboard .eyebrow {
  margin-bottom: 20px;
  color: #e12200;
  font-size: 0.75rem;
  letter-spacing: 0;
}

.dashboard-page #dashboard .section-heading h1 {
  max-width: 900px;
  color: #111827;
  font-size: clamp(2.75rem, 5.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.dashboard-page #dashboard .section-heading p:last-child {
  max-width: 820px;
  margin-top: 20px;
  color: #4b5563;
  font-size: 1.12rem;
  line-height: 1.6;
}

.dashboard-page #dashboard .filters {
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-page #dashboard .filters > * {
  flex: 0 0 320px;
  width: 320px;
  min-width: 0;
  height: 48px;
  border-color: #e5e7eb;
  border-radius: 10px;
  padding-inline: 16px;
  color: #111827;
  background-color: #fff;
  font-size: 0.94rem;
  font-weight: 400;
}

.filters > * {
  min-width: min(100%, 180px);
  flex: 1;
}

.issue-list {
  display: grid;
  gap: 14px;
}

.dashboard-page .issue-list {
  gap: 24px;
}

.issue-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(24, 49, 44, 0.08);
}

.public-issue-card {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-page .public-issue-card {
  gap: 20px;
  padding: 32px;
  border-color: #e5e7eb;
  border-radius: 16px;
  color: #111827;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.public-issue-card:hover,
.public-issue-card:focus {
  border-color: var(--primary);
  box-shadow: 0 14px 28px rgba(24, 49, 44, 0.12);
  transform: translateY(-1px);
}

.dashboard-page .public-issue-card:hover,
.dashboard-page .public-issue-card:focus {
  border-color: #d1d5db;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.issue-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.issue-card h3 {
  margin: 0;
}

.dashboard-page .issue-card header {
  gap: 20px;
  flex-wrap: nowrap;
}

.dashboard-page .issue-card-info {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-page .public-issue-card h3 {
  color: #111827;
  font-size: 1.25rem;
  line-height: 1.25;
}

.dashboard-page .issue-id {
  color: #e12200;
}

.dashboard-page .public-issue-card > p {
  margin: 0;
  color: #4b5563;
  font-size: 0.94rem;
  line-height: 1.6;
}

.meta,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.93rem;
}

.dashboard-page .meta {
  align-items: center;
  gap: 12px;
  color: #4b5563;
  font-size: 0.88rem;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: #9ca3af;
}

.upvote-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--primary);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-page .upvote-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-color: #e5e7eb;
  border-radius: 999px;
  padding: 10px 18px;
  color: #111827;
  background: #fff;
  font-size: 0.88rem;
  white-space: nowrap;
}

.upvote-button:hover,
.upvote-button:focus,
.upvote-button.is-active {
  color: #fff;
  background: var(--primary);
}

.dashboard-page .upvote-button:hover,
.dashboard-page .upvote-button:focus,
.dashboard-page .upvote-button.is-active {
  color: #111827;
  border-color: #d1d5db;
  background: #f9fafb;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  color: #374151;
  background: #f3f4f6;
  font-size: 0.82rem;
  font-weight: 800;
}

.tag.status-hidden,
.tag.status-rejected {
  color: #991b1b;
  background: #fee2e2;
}

.tag.status-for-review {
  color: #92400e;
  background: #fffbeb;
}

.tag.status-verified,
.tag.status-resolved {
  color: #065f46;
  background: #ecfdf5;
}

.tag.status-duplicate {
  color: #374151;
  background: #f3f4f6;
}

.issue-photo {
  max-width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.issue-modal-panel {
  gap: 32px;
  width: min(100%, 520px);
  max-height: calc(100dvh - 56px);
  overscroll-behavior: contain;
  padding: 32px;
  border-color: #e5e7eb;
  border-radius: 12px;
  color: #111827;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.issue-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.issue-modal-eyebrow {
  margin: 0;
  color: #e12200;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.issue-modal-close {
  position: static;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #6b7280;
  border-color: #e5e7eb;
  border-radius: 8px;
}

.issue-modal-hero {
  display: grid;
  gap: 16px;
}

.issue-modal-hero h1 {
  color: #111827;
  font-size: 1.5rem;
  line-height: 1.2;
}

.issue-modal-hero p {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

.issue-detail-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.issue-detail-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.issue-detail-list div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.issue-detail-list dt {
  color: #4b5563;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.issue-detail-list dd {
  margin: 0;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.issue-detail-list-stacked dd {
  color: #9ca3af;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  color: #374151;
  background: #f3f4f6;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-badge.status-verified,
.status-badge.status-resolved {
  color: #065f46;
  background: #ecfdf5;
}

.status-badge.status-for-review {
  color: #92400e;
  background: #fffbeb;
}

.status-badge.status-hidden,
.status-badge.status-rejected {
  color: #991b1b;
  background: #fee2e2;
}

.issue-modal-photo {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 6px;
}

.issue-modal-actions {
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
}

.issue-modal-upvote {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 10px 18px;
  color: #111827;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.issue-modal-upvote:hover,
.issue-modal-upvote:focus,
.issue-modal-upvote.is-active {
  border-color: #d1d5db;
  background: #f9fafb;
}

.dashboard-fab {
  position: fixed;
  right: 48px;
  bottom: 48px;
  z-index: 15;
  display: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  color: #e12200;
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.dashboard-page .dashboard-fab {
  display: grid;
}

.admin-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-controls label {
  font-size: 0.9rem;
}

.admin-controls .wide-control {
  grid-column: 1 / -1;
}

.admin-action-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.issue-card.has-unsaved-changes {
  border-color: #fbbf24;
}

.admin-save-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.admin-save-button {
  width: auto;
  color: #fff;
  background: var(--primary);
}

.admin-save-button:hover,
.admin-save-button:focus {
  color: #fff;
  background: #001c33;
}

.danger-button {
  width: auto;
  border-color: #fecaca;
  color: #991b1b;
  background: #fff5f5;
}

.danger-button:hover,
.danger-button:focus {
  border-color: #fca5a5;
  color: #7f1d1d;
  background: #fee2e2;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-card strong {
  display: block;
  font-size: 1.8rem;
}

footer {
  padding: 28px clamp(16px, 5vw, 64px);
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: #fff;
}

footer a {
  color: var(--primary);
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: auto;
    padding: 14px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 92px;
  }

  .brand-copy {
    display: none;
  }

  .hero {
    gap: 40px;
    padding: 56px 24px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .hero p {
    font-size: 1.05rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 20px;
    gap: 14px;
  }

  .hero-panel div {
    padding: 18px;
  }

  .hero-panel strong {
    font-size: 2.75rem;
  }

  .how-it-works {
    gap: 48px;
    padding: 72px 24px;
  }

  .step-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page #dashboard {
    padding: 48px 16px 96px;
  }

  .flag-page #flag {
    padding: 48px 16px 96px;
  }

  .flag-page #flag .section-heading h1 {
    font-size: clamp(2.1rem, 12vw, 3rem);
  }

  .flag-page #flag .section-heading p:last-child {
    font-size: 1rem;
  }

  .flag-page #issueForm {
    padding: 22px;
  }

  .confirmation-card {
    padding: 24px;
  }

  .submission-summary {
    padding: 20px;
  }

  .submission-note {
    margin-top: -24px;
  }

  .dashboard-page #dashboard .section-heading h1 {
    font-size: clamp(2.1rem, 12vw, 3rem);
  }

  .dashboard-page #dashboard .section-heading p:last-child {
    font-size: 1rem;
  }

  .dashboard-page #dashboard .filters > * {
    flex-basis: 100%;
    width: 100%;
  }

  .dashboard-page .issue-card header {
    flex-wrap: wrap;
  }

  .dashboard-page .public-issue-card {
    padding: 22px;
  }

  .dashboard-page .upvote-button {
    width: 100%;
    justify-content: center;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-panel,
  .issue-modal-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .issue-modal-panel {
    gap: 24px;
    padding: 24px;
  }

  .issue-detail-list-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-fab {
    right: 18px;
    bottom: 18px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .site-nav .ghost-button {
    justify-content: center;
    width: 100%;
  }

  .hero,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .admin-controls {
    grid-template-columns: 1fr;
  }
}
