/* Light theme matching the shared GoTriangle-family websites:
   navy #0D1F2C, GoTriangle blue #2B7BB9 / green #00A94F, gray #757575 / #E6E6E6.
   Each agency keeps the shared look with its own accent (GoRaleigh red, GoDurham blue). */
:root {
  --navy: #0d1f2c;
  --blue: #2b7bb9;
  --green: #00a94f;
  --green-dark: #00843f;
  --ink: #1b2730;
  --muted: #5c6670;
  --line: #dde3e8;
  --bg: #f4f6f8;
  --card: #ffffff;
  --radius: 12px;
  --tap: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 6px; z-index: 300; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--green); }
.header-inner { max-width: 1440px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.brand h1 { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.brand-sub { font-size: 13px; color: #b8c4cc; }
.header-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proto-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.btn-ghost { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-weight: 700; font-size: 14px; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Intro */
.intro { max-width: 1440px; margin: 16px auto 0; padding: 0 20px; }
.intro details { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: var(--radius); }
.intro summary { padding: 12px 16px; font-weight: 800; font-size: 16px; cursor: pointer; min-height: var(--tap); }
.intro-body { padding: 0 16px 16px; display: grid; gap: 12px; }
.intro-body > p { color: var(--muted); max-width: 900px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.steps strong { display: block; font-size: 14px; }
.steps span:not(.step-num) { font-size: 13px; color: var(--muted); }
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.demo-note { font-size: 13px; color: #8a5a00 !important; background: #fff6df; border-radius: 8px; padding: 8px 12px; }

/* Scenarios */
.scenarios { max-width: 1440px; margin: 14px auto 0; padding: 0 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scenarios-label { font-weight: 700; font-size: 14px; }
.scenario-list { display: flex; gap: 8px; flex-wrap: wrap; }
.scenario-btn { min-height: var(--tap); padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; border-left: 6px solid var(--ac); }
.scenario-btn:hover { border-color: var(--ac); }
.scenario-btn.active { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, #fff); }

/* Workspace */
.workspace { max-width: 1440px; margin: 14px auto 0; padding: 0 20px 20px; display: grid; grid-template-columns: 1.05fr 1fr .9fr; gap: 16px; align-items: start; scroll-margin-top: 60px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.panel-tag { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg); padding: 3px 9px; border-radius: 999px; }
.panel-body { padding: 16px; display: grid; gap: 6px; }

fieldset { border: 0; margin: 0 0 6px; min-width: 0; }
.label { display: block; font-size: 13px; font-weight: 700; margin: 8px 0 6px; color: var(--ink); }
.hint { font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid #c3ccd4; border-radius: 8px; background: #fff; font-size: 15px;
}
textarea { resize: vertical; line-height: 1.45; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-note { font-size: 12.5px; color: var(--muted); }

.agency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agency-btn { min-height: 58px; text-align: left; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); background: #fff; border-left: 6px solid var(--ac); display: grid; }
.agency-btn.active { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 9%, #fff); }
.agency-name { font-weight: 800; }
.agency-meta { font-size: 12.5px; color: var(--muted); }

.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.route-btn { min-height: var(--tap); display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.route-btn.selected { border-color: var(--navy); background: #eef3f7; box-shadow: inset 0 0 0 1px var(--navy); }
.route-swatch { min-width: 40px; height: 28px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.route-name { font-size: 12.5px; color: var(--muted); line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.es-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-secondary { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; font-size: 14px; }
.btn-secondary:hover { background: #eef5fb; }

.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.check { min-height: var(--tap); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--green-dark); }

.btn-publish { margin-top: 10px; min-height: 52px; width: 100%; border: 0; border-radius: 10px; background: var(--green-dark); color: #fff; font-weight: 800; font-size: 16px; }
.btn-publish:hover { background: #006e34; }

/* Website preview */
.browser { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #eef1f4; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 5px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #c3ccd4; }
.url { flex: 1; font-size: 12.5px; color: var(--muted); background: #fff; border-radius: 6px; padding: 3px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-banner { background: var(--navy); color: #fff; padding: 14px 16px; border-bottom: 4px solid var(--blue); }
.site-banner h3 { font-size: 18px; }
.site-banner p { font-size: 13px; color: #c9d3da; }
.filter-bar { display: flex; gap: 6px; padding: 10px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.filter-btn { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.alert-list { padding: 10px; display: grid; gap: 10px; max-height: 620px; overflow-y: auto; }
.alert-card { border: 1px solid var(--line); border-left: 5px solid var(--ac); border-radius: 8px; padding: 12px; display: grid; gap: 6px; font-size: 14px; }
.alert-top { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.agency-tag { color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.chip { font-weight: 800; font-size: 12px; padding: 3px 7px; border-radius: 6px; background: #e6e6e6; }
.effect-tag { font-size: 12px; font-weight: 700; color: #8a3b00; background: #fff1e0; padding: 3px 8px; border-radius: 6px; }
.alert-card h4 { font-size: 15.5px; line-height: 1.3; }
.alert-when { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.alert-es { background: var(--bg); border-radius: 6px; padding: 8px; }
.btn-listen { justify-self: start; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid #c3ccd4; background: #fff; font-weight: 700; font-size: 13.5px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.embed-details { margin-top: 10px; font-size: 14px; }
.embed-details summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; color: var(--blue); }
.embed-details p { color: var(--muted); margin-bottom: 8px; }
.embed-details code { display: block; font: 12.5px 'JetBrains Mono', monospace; background: var(--bg); padding: 10px; border-radius: 8px; margin-bottom: 8px; overflow-x: auto; }

/* Rider column */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 8px; }
.seg-btn { min-height: 40px; border: 0; border-radius: 8px; background: transparent; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.seg-btn.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.phone { max-width: 320px; margin: 0 auto; background: #1b2730; border-radius: 34px; padding: 14px 12px 18px; display: grid; gap: 10px; }
.phone-notch { width: 90px; height: 18px; border-radius: 0 0 12px 12px; background: #000; margin: -14px auto 0; }
.notif { background: rgba(255,255,255,.95); border-radius: 14px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.notif-app { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.notif strong { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.notif-meta { font-size: 12px; color: var(--muted); }
.channel-off { color: var(--muted); font-style: italic; }
.sms { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.small { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
.sub-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sub-table th, .sub-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sub-table th { background: var(--bg); font-weight: 700; }
.code { font: 11.5px/1.5 'JetBrains Mono', monospace; background: var(--navy); color: #d7e3ea; padding: 12px; border-radius: 8px; overflow: auto; max-height: 460px; }

/* Feedback */
.feedback-cta { max-width: 1400px; margin: 4px auto 0; padding: 20px; margin-inline: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #eaf6ef; border: 1px solid #bfe3cc; border-radius: var(--radius); }
@media (min-width: 1480px) { .feedback-cta { margin-inline: auto; } }
.feedback-cta h2 { font-size: 18px; }
.feedback-cta p { color: var(--muted); }
.feedback-cta .btn-publish { width: auto; padding: 0 24px; margin: 0; flex-shrink: 0; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(13,31,44,.55); }
dialog form { padding: 18px 20px 20px; display: grid; gap: 2px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dlg-head h2 { font-size: 18px; }
.btn-close { width: var(--tap); height: var(--tap); border: 0; background: transparent; font-size: 26px; border-radius: 8px; }
.hidden-field { position: absolute; left: -9999px; }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rating label { position: relative; }
.rating input { position: absolute; opacity: 0; inset: 0; }
.rating span { display: grid; place-items: center; min-height: var(--tap); border: 2px solid var(--line); border-radius: 8px; font-weight: 800; }
.rating input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.rating input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.rating-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.site-footer { max-width: 1440px; margin: 0 auto; padding: 20px; font-size: 12.5px; color: var(--muted); text-align: center; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .25s; z-index: 400; }
.toast.show { transform: translate(-50%, 0); }

.mobile-tabs { display: none; }

/* Tablet */
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr 1fr; }
  .panel-rider { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 820px) {
  body { font-size: 15.5px; }
  .header-inner { padding: 10px 14px; }
  .brand h1 { font-size: 17px; }
  .proto-pill { display: none; }
  .intro, .scenarios { padding: 0 14px; margin-top: 10px; }
  .steps { grid-template-columns: 1fr; }
  .scenarios { flex-wrap: nowrap; }
  .scenarios-label { display: none; }
  .scenario-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .scenario-btn { white-space: nowrap; }

  .mobile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); position: sticky; top: 0; z-index: 200; background: var(--navy); margin-top: 10px; }
  .mobile-tab { min-height: 52px; border: 0; background: transparent; color: #b8c4cc; font-weight: 700; font-size: 15px; border-bottom: 4px solid transparent; }
  .mobile-tab span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 12px; margin-right: 4px; }
  .mobile-tab.active { color: #fff; border-bottom-color: var(--green); }
  .mobile-tab.active span { background: var(--green); }

  .workspace { grid-template-columns: 1fr; padding: 12px 10px; gap: 12px; }
  .workspace .panel { display: none; }
  .workspace[data-mobile-tab="compose"] .panel-compose,
  .workspace[data-mobile-tab="website"] .panel-website,
  .workspace[data-mobile-tab="rider"] .panel-rider { display: block; }
  .panel-head { padding: 10px 14px; }
  .panel-body { padding: 14px; }
  .route-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-height: 300px; }
  .channel-grid, .row-2 { grid-template-columns: 1fr; }
  .alert-list { max-height: none; }
  .feedback-cta { margin-inline: 10px; flex-direction: column; align-items: stretch; text-align: left; }
  .feedback-cta .btn-publish { width: 100%; }
}
