:root {
  --paper: #f6f3ec;
  --panel: #fffdfa;
  --ink: #171714;
  --muted: #756f66;
  --line: #dcd6ca;
  --line-strong: #c9c0b4;
  --accent: #9b3e2e;
  --accent-2: #c87f52;
  --soft: #eee8dc;
  --soft-2: #f2eee5;
  --green: #416c54;
  --green-soft: #e7efe9;
  --red: #9d3d3d;
  --red-soft: #f4e4e2;
  --amber: #8a6a25;
  --amber-soft: #f1ead7;
  --blue: #496271;
  --blue-soft: #e5ecef;
  --shadow: 0 10px 28px rgba(34, 27, 18, 0.07);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

a {
  color: inherit;
}

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

/* ---------- Account Hub header ---------- */

.rf-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 236, 0.94);
  backdrop-filter: blur(12px);
}

.rf-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.rf-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, #e8e1d5, #f8f4ed);
  color: #514a42;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.rf-wordmark {
  display: grid;
  gap: 2px;
}

.rf-wordmark strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.rf-wordmark small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rf-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rf-nav a,
.rf-nav .nav-button {
  appearance: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 9px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rf-nav a:hover,
.rf-nav .nav-button:hover,
.rf-nav a.active {
  transform: none;
  filter: none;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.rf-nav .nav-cta {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.rf-nav .nav-cta:hover,
.rf-nav .nav-cta.active {
  background: #292924;
  color: #fff;
}

.logout-form {
  margin: 0;
}

/* ---------- Shared typography ---------- */

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.04;
}

h3 {
  font-size: 20px;
  line-height: 1.1;
}

p {
  color: var(--muted);
  line-height: 1.62;
}

.eyebrow,
.choice-kicker,
.rf-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.muted,
.small-note {
  color: var(--muted);
}

/* ---------- Main page shells ---------- */

.feedback-page,
.dashboard-shell,
.rf-shell,
.auth-card.account-card {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.rf-shell,
.dashboard-shell {
  display: grid;
  gap: 18px;
}

.auth-card.account-card {
  display: block;
}

.center-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 36px 24px 64px;
}

.split-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  background: var(--paper);
}

/* ---------- HUB-like panels ---------- */

.hero-panel,
.message-card,
.form-card,
.dashboard-card,
.choice-card,
.trust-strip article,
.brand-panel,
.rf-card,
.auth-card.account-card,
.device-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

.hero-panel {
  padding: clamp(28px, 5vw, 52px);
  text-align: left;
}

.hero-panel h1 {
  max-width: 900px;
}

.hero-panel p {
  max-width: 820px;
  margin: 15px 0 0;
  font-size: 14px;
}

.hero-line {
  color: var(--ink) !important;
  font-weight: 850;
}

.compact-hero {
  padding-block: 34px;
}

.dashboard-grid,
.dual-choice-grid,
.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dashboard-card,
.choice-card,
.trust-strip article {
  padding: 24px;
}

.choice-card,
.dashboard-card {
  min-width: 0;
}

.choice-build,
.choice-accountability {
  position: relative;
  overflow: hidden;
}

.choice-build::before,
.choice-accountability::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}

.choice-accountability::before {
  background: var(--red);
}

.choice-card h2,
.dashboard-card h2,
.trust-strip h2 {
  margin-bottom: 10px;
}

.choice-card ul,
.clean-list {
  margin: 14px 0 20px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- Register split ---------- */

.brand-panel {
  position: relative;
  padding: clamp(36px, 6vw, 72px);
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: #f2eee5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-panel h1 {
  max-width: 620px;
}

.brand-panel > p {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 15px;
}

.value-grid {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.value-card {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.72);
}

.value-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12px;
}

.value-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
}

.form-card {
  width: min(720px, 100%);
  padding: clamp(24px, 4vw, 38px);
}

.wide-card {
  width: 100%;
  max-width: none;
}

.form-section {
  margin-top: 14px;
}

.form-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.form-intro,
.intro {
  margin: 10px 0 22px;
}

.mini-account-pill {
  flex: 0 0 auto;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-2);
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}

/* ---------- Forms ---------- */

.rf-form p,
form p {
  margin: 0 0 16px;
}

.rf-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.rf-form-grid p:has(textarea),
.rf-form-grid p:has(#id_contact_preference),
.full-row,
.rf-form .errorlist {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #b9ada0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(155, 62, 46, 0.07);
}

input::placeholder,
textarea::placeholder {
  color: #aaa197;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--ink);
}

#id_contact_preference {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

#id_contact_preference li {
  list-style: none;
}

.helptext {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.errorlist,
.error-message,
.success-message {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #ddb9b3;
  border-radius: 10px;
  background: var(--red-soft);
  color: #7d2f2f;
  list-style: none;
  font-size: 11px;
  line-height: 1.45;
}

.success-message {
  border-color: #bdd0c1;
  background: var(--green-soft);
  color: #284d37;
}

.notice-box,
.status-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft-2);
}

.notice-box p {
  margin: 5px 0 0;
}

.left-align {
  text-align: left;
}

/* ---------- Buttons ---------- */

button,
.btn,
.rf-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: none;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

button:hover,
.btn:hover,
.rf-button:hover {
  transform: translateY(-1px);
  filter: none;
  background: #292924;
}

.btn-primary,
.rf-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.btn-secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--line-strong);
  background: var(--soft-2);
  color: var(--ink);
}

.btn-danger {
  border-color: #c98f87;
  background: var(--red-soft);
  color: #7d2f2f;
}

.btn-danger:hover {
  background: #ecd2ce;
}

.text-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.submit-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.actions {
  justify-content: center;
}

/* ---------- Message / auth cards ---------- */

.message-card {
  width: min(760px, 100%);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}

.login-card {
  width: min(620px, 100%);
}

.message-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #e8e1d5, #f8f4ed);
  color: #514a42;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 600;
}

.message-icon.error {
  border-color: #d8aaa3;
  background: var(--red-soft);
  color: var(--red);
}

.status-box {
  max-width: 620px;
  margin-inline: auto;
  text-align: left;
}

.status-box h2 {
  font-size: 23px;
}

.status-list {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.status-dot {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
}

/* ---------- Account dashboard ---------- */

.dashboard-card h2 {
  font-size: 28px;
}

.submission-list {
  display: grid;
  gap: 10px;
}

.submission-item,
.device-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf7;
}

.submission-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.submission-item p {
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: #5e574e;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-fixed {
  background: var(--green-soft);
  color: #284d37;
}

.status-closed {
  background: var(--soft);
  color: #5e574e;
}

.status-reviewing {
  background: var(--blue-soft);
  color: #34515f;
}

.status-planned {
  background: var(--amber-soft);
  color: #72591e;
}

/* ---------- Device / Planned Feature utility pages ---------- */

.rf-card,
.auth-card.account-card {
  padding: 22px;
}

.rf-card + .rf-card {
  margin-top: 0;
}

.rf-card > h1,
.auth-card.account-card > h1 {
  margin-bottom: 10px;
}

.rf-card > h2,
.auth-card.account-card > h2 {
  margin: 28px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 25px;
}

.rf-card .rf-card {
  margin-top: 10px !important;
  padding: 14px;
  border-radius: 12px;
  background: #fbfaf7;
}

.rf-card form,
.auth-card.account-card form {
  margin-top: 16px;
}

.rf-card p:last-child,
.device-row p:last-child {
  margin-bottom: 0;
}

.device-row {
  margin-top: 10px;
}

pre {
  max-width: 100%;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft-2);
  color: #514a42;
  font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Scrollbars ---------- */

body::-webkit-scrollbar,
textarea::-webkit-scrollbar,
pre::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb {
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: #c9c0b4;
}

body::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
  background: var(--paper);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .dashboard-grid,
  .dual-choice-grid,
  .trust-strip,
  .split-shell,
  .rf-form-grid {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    border-width: 0 0 1px;
  }

  .form-heading-row {
    flex-direction: column;
  }

  .mini-account-pill {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .rf-header {
    position: relative;
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding-block: 14px;
  }

  .rf-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .rf-nav a,
  .rf-nav .nav-button {
    padding-inline: 9px;
  }

  .feedback-page,
  .dashboard-shell,
  .rf-shell,
  .auth-card.account-card {
    width: min(100% - 24px, 1220px);
    padding-top: 18px;
  }

  .hero-panel,
  .form-card,
  .message-card,
  .dashboard-card,
  .choice-card,
  .trust-strip article,
  .rf-card,
  .auth-card.account-card {
    border-radius: 13px;
  }

  h1 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .center-shell {
    min-height: auto;
    padding: 20px 12px 48px;
  }

  .submit-row,
  .actions {
    align-items: stretch;
  }
}

/* Notifications Hub v1 nav badge */
.rf-nav .nav-count{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 5px;margin-left:4px;border-radius:999px;background:#151513;color:#f6f3ec;font-size:.64rem;font-weight:900;line-height:1}
.rf-nav a.active .nav-count{background:#f6f3ec;color:#151513}


/* ---------- Cross-module information architecture ---------- */
.cn-section-nav {
  width: min(1280px, calc(100% - 48px));
  margin: 18px auto 0;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.cn-section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.48);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}
.cn-section-nav a.active,
.cn-section-nav a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
@media (max-width: 760px) {
  .cn-section-nav { width: calc(100% - 32px); margin-top: 12px; }
}

/* Attention section: approval count when Approvals is nested under Notifications. */
.cn-section-nav .nav-count{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 5px;margin-left:5px;border-radius:999px;background:#151513;color:#f6f3ec;font-size:.64rem;font-weight:900;line-height:1}
.cn-section-nav a.active .nav-count{background:#f6f3ec;color:#151513}
