:root {
  --bu-green: #0b5d3b;
  --bu-green-dark: #073d27;
  --bu-gold: #c9a227;
  --bg: #f6f7f5;
  --card-bg: #ffffff;
  --text: #1f2723;
  --muted: #5b6b62;
  --border: #dfe6e1;
  --danger: #b3261e;
  --warning: #a5680c;
  --ok: #1c7a3e;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--bu-green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Header / navbar ---------------- */
.navbar {
  background: var(--bu-green-dark);
  background-image: linear-gradient(180deg, #0a5136 0%, var(--bu-green-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.navbar a, .navbar .link-button { color: #fff; text-decoration: none; }
.navbar a:hover, .navbar .link-button:hover { text-decoration: none; color: var(--bu-gold); }

.brand { display: flex; align-items: center; gap: .65rem; }
.brand:hover { color: #fff; }
.brand-badge {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  color: var(--bu-gold);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.brand-subtitle { font-weight: 400; font-size: .7rem; color: #cfe4d8; margin-top: .1rem; }
.brand:hover .brand-title { color: #fff; }

.navbar-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  row-gap: .5rem;
}
.nav-links, .nav-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.1rem; row-gap: .5rem; }
.navbar-nav a { font-size: .89rem; font-weight: 500; opacity: .92; }
.navbar-nav a:hover { opacity: 1; }
.navbar-nav a.button {
  background: var(--bu-gold);
  color: #2b2100 !important;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  opacity: 1;
}
.navbar-nav a.button:hover { background: #dcb534; }
.nav-account { font-weight: 600; }
.nav-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.25); display: inline-block; }

.inline-form { display: inline; }
.link-button {
  background: none; border: none; cursor: pointer;
  font-size: .89rem; font-weight: 500; padding: 0; font-family: inherit; opacity: .92;
}
.link-button:hover { opacity: 1; }

/* Smart language switcher: native <details>/<summary>, no JS needed */
.navbar .lang-switch { position: relative; }
.navbar .lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .85rem;
  transition: background .15s ease;
}
.navbar .lang-switch summary::-webkit-details-marker { display: none; }
.navbar .lang-switch summary:hover { background: rgba(255,255,255,0.18); }
.navbar .lang-switch[open] summary { background: rgba(255,255,255,0.22); }
.navbar .lang-switch .lang-caret { transition: transform .15s ease; }
.navbar .lang-switch[open] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  min-width: 160px;
  padding: .4rem;
  z-index: 50;
}
.lang-menu-form { margin: 0; }
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 6px;
  padding: .5rem .6rem;
  font-size: .9rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.lang-option:hover { background: var(--bg); }
.lang-option.active { color: var(--bu-green-dark); font-weight: 600; }
.lang-option svg { color: var(--bu-green); flex-shrink: 0; margin-left: .5rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.container.narrow { max-width: 620px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card h2, .card h3 { margin-top: 0; }

.hero { text-align: center; padding: 3rem 1rem 2.5rem; }
.hero h1 { font-size: 2rem; margin-bottom: .5rem; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 1.5rem; }
.hero .actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--bu-green);
  color: #fff;
  border: none;
  padding: .65rem 1.3rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .95rem;
}
.btn:hover { background: var(--bu-green-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--bu-green); border: 1px solid var(--bu-green); }
.btn.danger { background: var(--danger); }
.btn.small { padding: .35rem .8rem; font-size: .82rem; }

form p { margin: .9rem 0; }
label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url],
select, textarea {
  width: 100%;
  max-width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
  font-family: inherit;
}
textarea { resize: vertical; }
.helptext { color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: .3rem 0; font-size: .85rem; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: .5rem; font-size: .92rem; }
.messages li.success { background: #e4f5ea; color: var(--ok); border: 1px solid #b9e3c8; }
.messages li.error { background: #fbe9e7; color: var(--danger); border: 1px solid #f3c2bc; }
.messages li.info { background: #eaf1fb; color: #1a4a8c; border: 1px solid #c7d9f5; }
.messages li.warning { background: #fdf3dd; color: var(--warning); border: 1px solid #f0dba3; }

.tracking-id {
  font-family: "Courier New", monospace;
  font-size: 1.4rem;
  letter-spacing: .05em;
  background: var(--bg);
  border: 1px dashed var(--bu-green);
  padding: .6rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

.badge { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge.submitted { background: #eaf1fb; color: #1a4a8c; }
.badge.under_review { background: #fdf3dd; color: var(--warning); }
.badge.action_taken { background: #f0e6fb; color: #5b2ba8; }
.badge.resolved { background: #e4f5ea; color: var(--ok); }
.badge.rejected { background: #fbe9e7; color: var(--danger); }
.badge.low { background: #eef2ee; color: var(--muted); }
.badge.medium { background: #fdf3dd; color: var(--warning); }
.badge.high { background: #fbe4d6; color: #a34a11; }
.badge.critical { background: #fbe0de; color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; text-align: center; }
.stat-box .num { font-size: 1.8rem; font-weight: 700; color: var(--bu-green-dark); }
.stat-box .label { color: var(--muted); font-size: .82rem; }

.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters select { width: auto; }

.thread-item { border-left: 3px solid var(--bu-green); padding: .5rem .9rem; margin-bottom: .8rem; background: var(--bg); border-radius: 0 8px 8px 0; }
.thread-item.internal { border-left-color: var(--warning); background: #fdf6e6; }
.thread-item .meta { color: var(--muted); font-size: .78rem; margin-bottom: .25rem; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .5rem 0 .5rem 1.2rem; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .8rem; width: 8px; height: 8px; border-radius: 50%; background: var(--bu-green); }
.timeline li .when { color: var(--muted); font-size: .78rem; }

footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 2rem 1rem; }
.field-error input, .field-error textarea, .field-error select { border-color: var(--danger); }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ---------------- Home page ---------------- */
.hero { text-align: center; padding: 3.5rem 1rem 3rem; }
.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bu-green-dark);
  background: #e4f5ea;
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2.2rem; line-height: 1.25; margin: 0 0 .75rem; color: var(--bu-green-dark); }
.hero p { color: var(--muted); max-width: 660px; margin: 0 auto 1.75rem; font-size: 1.02rem; }
.hero .actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }

.trust-row {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
}
.trust-row li {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .88rem;
}
.trust-row svg { color: var(--bu-green); flex-shrink: 0; }

.section-title { text-align: center; font-size: 1.4rem; color: var(--bu-green-dark); margin: 0 0 1.75rem; }
.section-title.small { text-align: left; font-size: 1.15rem; margin-bottom: .75rem; }

.how-it-works { padding: 1rem 0 2.5rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bu-green);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
  font-size: 1.05rem;
}
.step-card h3 { margin: 0 0 .5rem; color: var(--bu-green-dark); }

.coverage-section {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--bu-green-dark);
  color: #fff;
  border-radius: 14px;
  padding: 2rem;
  margin: 1rem 0 2rem;
}
.coverage-card { text-align: center; }
.coverage-num { font-size: 2.4rem; font-weight: 700; color: var(--bu-gold); }
.coverage-label { font-size: .85rem; color: #cfe4d8; margin-top: .25rem; }
.coverage-categories .section-title.small { color: #fff; }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .82rem;
}
@media (max-width: 700px) { .coverage-section { grid-template-columns: 1fr; text-align: center; } .pill-row { justify-content: center; } }

.trust-section { margin-bottom: 2rem; }
.trust-card { text-align: center; max-width: 780px; margin: 0 auto; }

.cta-band {
  text-align: center;
  background: #eef6f0;
  border: 1px dashed var(--bu-green);
  border-radius: 14px;
  padding: 2.25rem 1.5rem;
  margin-bottom: 1rem;
}
.cta-band h2 { color: var(--bu-green-dark); margin: 0 0 .4rem; }
.cta-band .btn { margin-top: 1rem; }

/* ---------------- Dashboard performance table ---------------- */
.table-scroll { overflow-x: auto; }
.rate-cell { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.rate-bar {
  width: 70px;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.rate-bar-fill { height: 100%; background: var(--ok); border-radius: 999px; }
.rate-label { font-size: .82rem; color: var(--muted); }

/* ---------------- CKEditor character counter ---------------- */
.char-counter {
  display: block;
  text-align: right;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .3rem;
}

/* ---------------- Attachment picker with previews ---------------- */
.attachment-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .8rem;
  margin-top: .9rem;
}
.attach-notice {
  grid-column: 1 / -1;
  background: #fdf3dd;
  color: var(--warning);
  border: 1px solid #f0dba3;
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .82rem;
}
.attach-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.attach-card.invalid { border-color: var(--danger); background: #fdf2f1; }
.attach-thumb {
  width: 100%;
  height: 90px;
  border-radius: 6px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-icon {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  background: #e9efeb;
  padding: .4rem .7rem;
  border-radius: 6px;
}
.attach-meta { min-width: 0; }
.attach-name {
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attach-size { font-size: .76rem; color: var(--muted); }
.attach-warning { font-size: .76rem; color: var(--danger); margin-top: .15rem; }
.attach-remove {
  position: absolute;
  top: .4rem;
  right: .4rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attach-remove:hover { background: var(--danger); }

/* CKEditor 5 fits the site's card styling instead of looking like a
   default browser widget dropped onto the page. */
.ck-editor__editable_inline {
  border-radius: 0 0 8px 8px !important;
}
.ck.ck-toolbar {
  border-radius: 8px 8px 0 0 !important;
  background: var(--bg) !important;
}
