/* Long Arc style: purple #512D6D, grey accents, Arial. Sleek, modern, clean. */
:root {
  --purple: #512D6D;
  --purple-dark: #3d2153;
  --purple-tint: #f3eef7;
  --ink: #1f1f24;
  --grey: #6b6b75;
  --line: #e3e1e8;
  --bg: #f7f7f9;
  --white: #ffffff;
  --red: #a4262c;
  --radius: 8px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--purple); }
h1 { font-size: 26px; margin: 8px 0 20px; font-weight: 700; }
h2 { font-size: 18px; margin: 0 0 10px; }
.muted { color: var(--grey); }

.topbar { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 60px; background: var(--white); border-bottom: 3px solid var(--purple); }
.topbar nav { display: flex; gap: 20px; flex: 1; }
.topbar nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.topbar nav a:hover { color: var(--purple); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .logo { height: 32px; width: auto; display: block; }
.brand-app { color: var(--grey); font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.brand .brand-app { border-left: 1px solid var(--line); padding-left: 12px; line-height: 32px; }
.auth-brand { text-align: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.auth-brand .logo-large { width: 240px; max-width: 100%; height: auto; display: block; margin: 0 auto 8px; }
.signout { display: flex; align-items: center; gap: 12px; margin: 0; }

.page { max-width: 1100px; margin: 0 auto; padding: 28px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 420px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.notice { background: var(--purple-tint); border-left: 4px solid var(--purple); padding: 10px 14px; border-radius: 4px; margin-bottom: 18px; }
.notice.error { background: #fbeeee; border-color: var(--red); }

label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; color: var(--grey); }
label.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; color: var(--ink); }
input, select, textarea { font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple); outline-offset: -1px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.weights { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
form.inline { display: inline-flex; align-items: center; gap: 10px; margin: 0; }

button, .button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; padding: 9px 16px; border: 1px solid var(--purple); text-decoration: none; display: inline-block; }
button.primary, .button.primary { background: var(--purple); color: var(--white); }
button.primary:hover, .button.primary:hover { background: var(--purple-dark); }
button.secondary { background: var(--white); color: var(--purple); }
button.small { padding: 5px 10px; font-size: 13px; }
button:not(.primary):not(.secondary):not(.link) { background: var(--white); color: var(--purple); }
button.link { background: none; border: none; color: var(--purple); padding: 0; }

.heading-row { display: flex; justify-content: space-between; align-items: center; }
.table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--grey); background: #fafafb; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table.compact { margin-bottom: 16px; }
tr.inactive td { color: var(--grey); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--purple); border-radius: var(--radius); padding: 16px 18px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--purple); }
.stat-label { color: var(--grey); font-size: 13px; }

.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--purple-tint); color: var(--purple); font-weight: 600; margin-left: 4px; }
.steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.steps a { flex: 1; min-width: 180px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 600; }
.steps a span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: 12px; margin-right: 6px; }
.steps a em { font-weight: 400; color: var(--grey); font-style: normal; font-size: 13px; }
.steps a.active { border-color: var(--purple); box-shadow: inset 0 -3px 0 var(--purple); }
.steps a.active span { background: var(--purple); color: var(--white); }
.add-row { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.table-scroll { overflow-x: auto; }
.review input, .review select { width: 100%; min-width: 70px; }
h2 .small { font-weight: 400; margin-left: 8px; }
textarea { width: 100%; }
.hidden { display: none; }
.tag.warn { background: #fdf1e3; color: #8a4b08; }
.tag.grey { background: #efeff2; color: var(--grey); }
.status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; }
.status-failed { border-left-color: var(--red); }
.status-capped { border-left-color: #c77d12; }
.status .cost { margin-left: auto; color: var(--grey); font-size: 13px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.results td { vertical-align: top; }
.evidence { max-width: 340px; color: var(--grey); font-size: 13px; }
details summary { cursor: pointer; font-weight: 600; }
.results tbody.result { border-bottom: 1px solid var(--line); }
.results tbody.result td { border-bottom: none; }
.score-cell { width: 70px; text-align: center; }
.score { font-size: 24px; font-weight: 700; color: var(--purple); line-height: 1.1; }
.blurb { margin: 6px 0; }
.why summary { font-size: 13px; color: var(--purple); }
.why { margin-top: 4px; }
.breakdown { border-collapse: collapse; margin: 8px 0; width: 100%; }
.breakdown td { padding: 3px 8px 3px 0; border: none; vertical-align: middle; }
.breakdown td:first-child { white-space: nowrap; font-size: 13px; font-weight: 600; }
.breakdown .bar { width: 90px; }
.breakdown .bar span { display: block; height: 8px; border-radius: 4px; background: var(--purple); min-width: 2px; }
.breakdown .num { width: 30px; text-align: right; font-size: 13px; }
.breakdown tr.nodata .bar span { background: var(--line); }
.breakdown tr.nodata td { color: var(--grey); }
.history { margin: 8px 0; }
.actions { width: 230px; }
.actions .thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.down-form select { padding: 4px; font-size: 12px; max-width: 130px; }
button:disabled { opacity: .6; cursor: default; }
.lead { font-size: 17px; margin-top: -10px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.path { border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 6px; padding: 10px 14px; margin-bottom: 10px; }
.path-warn { border-left-color: #c77d12; }
.path-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.path-chain { flex: 1; }
.path .strength { font-weight: 700; color: var(--purple); font-size: 18px; }
.path ul { margin: 6px 0; padding-left: 18px; }
.path-feedback { display: flex; gap: 6px; flex-wrap: wrap; }
.notice.warn { background: #fdf1e3; border-color: #c77d12; }
.roster-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.roster-item:last-child { border-bottom: none; }
.inline-spinner { display: inline-block; vertical-align: middle; }
a.button.small { padding: 5px 10px; font-size: 13px; }
h3.small { margin: 12px 0 6px; color: var(--grey); }
.grid2.tight { grid-template-columns: 1fr 1fr; gap: 8px; }
.filters { align-items: flex-end; }
.status-tag-networked { background: #e5f3ea; color: #1d6b38; }
.status-tag-no_path { background: #efeff2; color: var(--grey); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-target { font-size: 12px; color: var(--grey); }

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .page { padding: 16px; }
}
