/* The Oakridge Portal. Same warm campfire colours as greateroakridge.com. */
:root {
  --bg: #0d0a08; --bg-2: #14100c; --surface: rgba(255, 238, 220, .045); --surface-2: rgba(255, 238, 220, .075);
  --border: rgba(255, 228, 200, .11); --border-strong: rgba(255, 228, 200, .22);
  --text: #f7efe6; --text-2: #d8c9b9; --muted: #a8968a;
  --ember: #f08a3c; --ember-2: #ffb36b; --ember-deep: #c25e1b;
  --danger: #ef5a4c; --success: #4cc38a; --warning: #f0b429; --info: #6aa5ff;
  --display: 'Poppins', system-ui, sans-serif; --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px; color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text); font: 15px/1.6 var(--body);
  background: radial-gradient(ellipse 90% 50% at 50% -5%, rgba(240, 138, 60, .16), transparent 70%), var(--bg); overflow-x: hidden; }
a { color: var(--ember-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font: italic 800 clamp(1.9rem, 5vw, 3rem)/1.1 var(--display); letter-spacing: -.01em; }
h2 { font: italic 700 1.35rem/1.2 var(--display); margin-top: 8px; }
h3 { font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-bottom: 48px; }
section { margin-top: 40px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 15px; height: 15px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); background: rgba(13, 10, 8, .85); backdrop-filter: blur(10px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: italic 700 1.1rem var(--display); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--ember); }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.who img { border-radius: 50%; flex: none; }

/* Buttons and tags */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: 600 14px var(--body); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--ember); }
.btn:disabled { opacity: .55; cursor: not-allowed; border-color: var(--border); }
.btn-primary { background: linear-gradient(180deg, var(--ember), var(--ember-deep)); border-color: transparent; color: #1a0d04; }
.btn-ghost { background: transparent; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.tag-owner { color: var(--ember-2); border-color: rgba(240, 138, 60, .45); }
.tag-lead { color: var(--info); border-color: rgba(106, 165, 255, .4); }

/* Status lights */
.light { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.light i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.light-online { color: var(--success); } .light-online i { background: var(--success); box-shadow: 0 0 0 3px rgba(76, 195, 138, .18); }
.light-maintenance { color: var(--warning); } .light-maintenance i { background: var(--warning); }
.light-down { color: var(--danger); } .light-down i { background: var(--danger); }

/* Notices */
.notice { background: rgba(240, 180, 41, .1); border-bottom: 1px solid rgba(240, 180, 41, .3); color: var(--text); padding: 10px 0; font-size: 14px; }
.notice span { color: var(--text-2); }
.alert { margin: 20px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(239, 90, 76, .4); background: rgba(239, 90, 76, .08); }
.loading { padding: 60px 0; text-align: center; }

/* Hero */
.hero { padding: 56px 0 8px; max-width: 760px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ember); margin-bottom: 10px; }
.hero .lead { font-size: 1.08rem; color: var(--text-2); max-width: 620px; }
.summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

.access-box { margin-top: 28px; padding: 20px 22px; border-radius: var(--r); border: 1px solid rgba(240, 138, 60, .3);
  background: linear-gradient(135deg, rgba(240, 138, 60, .1), rgba(240, 138, 60, .02)); }
.access-box h3 { color: var(--ember-2); }
.access-box p { max-width: 680px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.steps li { padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.steps li > span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(240, 138, 60, .14); color: var(--ember-2); margin-bottom: 10px; }
.steps b { display: block; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 14px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.grid-sites { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: flex; flex-direction: column; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); color: var(--text); min-width: 0; }
a.card:hover { text-decoration: none; border-color: var(--border-strong); background: var(--surface-2); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-head h3 { margin: 0 0 2px; }
.badge-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: rgba(240, 138, 60, .13); color: var(--ember-2); }
.badge-ic .ic { width: 24px; height: 24px; }
.feat { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
.feat li { display: flex; gap: 8px; align-items: flex-start; }
.feat .ic { color: var(--success); margin-top: 3px; }
.feat b { color: var(--text); font-weight: 600; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.host { margin-top: auto; font-size: 13px; color: var(--ember-2); }
.site p { font-size: 14px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

/* Maintenance page */
.maint { max-width: 520px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.maint h1 { font-size: 2rem; }

@media (max-width: 760px) {
  .grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 36px; }
  .who span { display: none; }
  .account .tag-owner, .account .tag-lead { display: none; }
}

/* Phase 2: access pages */
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover, .nav a.on { background: var(--surface-2); color: var(--text); text-decoration: none; }
.page { padding-top: 36px; }
.page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.panel { margin-top: 32px; padding: 20px 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.small { font-size: 13.5px; }
.empty { padding: 18px; border-radius: var(--r); border: 1px dashed var(--border-strong); color: var(--muted); text-align: center; }
.code { font: 600 12.5px var(--mono, ui-monospace), Consolas, monospace; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ember-2); margin-right: 6px; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.row-between h3 { margin-bottom: 2px; }
.row-between p { margin: 0; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row p { margin: 2px 0 0; }
.row .grow { flex: 1; min-width: 0; }
.log .row { padding: 9px 16px; }
.card.key .invites { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-danger { border-color: rgba(239, 90, 76, .5); color: #ff9a8f; background: rgba(239, 90, 76, .08); }
.btn-danger:hover { border-color: var(--danger); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
blockquote { margin: 8px 0 12px; padding: 10px 14px; border-left: 3px solid var(--ember-deep); background: var(--surface-2); border-radius: 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--ember-2); font-weight: 600; font-size: 14px; }
details .form { margin-top: 10px; }

/* Forms */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text-2); min-width: 0; }
.form input, .form select, .form textarea { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: 400 15px var(--body); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid rgba(240, 138, 60, .5); outline-offset: 1px; }
.form textarea { resize: vertical; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend { font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hint { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 8px !important; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text) !important; cursor: pointer; }
.check input { width: auto; accent-color: var(--ember); }
.form-error { margin: 0; color: #ff9a8f; font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }
.form .btn { justify-self: start; }

@media (max-width: 760px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .row { flex-direction: column; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .account { gap: 6px; }
  .account .btn { padding: 7px 10px; font-size: 13px; }
}

/* Phase 3: bot network */
.mini { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: 14px; }
.mini li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
.mini li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row-danger { background: rgba(239, 90, 76, .06); }
.setup { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); }
.setup p { margin: 0; }

/* Phase 4: control room */
.tabs { display: flex; gap: 4px; margin: 18px 0 8px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 14px; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: var(--ember-2); border-bottom-color: var(--ember); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
a.tile:hover { text-decoration: none; border-color: var(--border-strong); }
.tile b { font: italic 800 1.9rem/1.1 var(--display); color: var(--ember-2); }
.tile span { font-size: 13px; color: var(--muted); }
.chart-wrap { margin-top: 12px; padding: 16px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--body); }
.chart .axis { stroke: var(--border-strong); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.legend i, .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.rank { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; counter-reset: r; }
.rank li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; min-width: 0; }
.rank li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-bot { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); margin: 2px 2px 0 0; }
.card-blocked { border-color: rgba(239, 90, 76, .45); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.filters select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: 400 14px var(--body); max-width: 100%; }

/* Phase 5: global bans and appeals */
.page.narrow { max-width: 760px; }
.alert.ok { border-color: rgba(76, 195, 138, .45); background: rgba(76, 195, 138, .08); }

/* Phase 6: department tools and laws */
.search-row { display: flex; gap: 8px; margin-top: 12px; }
.search-row input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: 400 15px var(--body); }
.search-row input:focus { outline: 2px solid rgba(240, 138, 60, .5); outline-offset: 1px; }
#law-results { margin-top: 18px; }
mark { background: rgba(240, 138, 60, .3); color: var(--text); border-radius: 3px; padding: 0 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 8px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.table select, .table input { width: 100%; min-width: 110px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: 400 14px var(--body); }
.rank-rows { display: grid; gap: 10px; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 12px; border-top: 1px solid var(--border); }
  .table tr:first-child { border-top: 0; }
  .table td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; }
  .table td::before { content: attr(data-label); font-size: 12.5px; color: var(--muted); font-weight: 600; }
  .table-wrap { overflow: visible; }
}
