/* MOGUL — spillets udseende. Mørk "filtdug om natten" med messing som accent.
   Display: Archivo (bred, fed). Brødtekst: Instrument Sans. Tal: JetBrains Mono. */
@import url(fonts.css);
:root {
  --bg: #0b1310; --bg2: #0e1914; --panel: #12201a; --panel2: #172a21; --panel3: #1d3428; --line: #22392d; --line2: #2d4a3a;
  --ink: #edf0e7; --muted: #9bb0a2; --dim: #66796c;
  --brass: #e2b04f; --brass2: #f4d281; --brass-ink: #1b1406; --felt: #1a3a2a;
  --up: #52d697; --down: #ff7d69; --warn: #f2b84b; --info: #85c7ff;
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 8px; --side: 236px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--brass2); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); } .dim { color: var(--dim); } .warn { color: var(--warn); }
.brass { color: var(--brass); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; align-content: start; } .stack.tight { gap: 8px; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; } .center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- Lille skærm ---------- */
.toosmall { display: none; }
@media (max-width: 899px) {
  .toosmall { display: grid; place-items: center; position: fixed; inset: 0; z-index: 999; background: var(--bg); padding: 24px; text-align: center; }
  .toosmall h2 { font-size: 32px; font-stretch: 125%; font-weight: 900; color: var(--brass); margin-bottom: 8px; }
}

/* ---------- Skal: sidebar + top + indhold ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.brand { padding: 22px 22px 14px; display: block; color: var(--ink); }
.brand:hover { text-decoration: none; }
.wordmark { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: -.01em; }
.wordmark span { color: var(--brass); }
.brand small { display: block; color: var(--dim); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; font-family: var(--mono); }
.nav { padding: 6px 10px 12px; display: grid; gap: 1px; }
.nav h6 { margin: 14px 12px 4px; font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--panel2); color: var(--ink); box-shadow: inset 2px 0 0 var(--brass); }
.nav .ic { width: 20px; text-align: center; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.me-chip { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.me-chip:hover { text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--felt); border: 1px solid var(--line2); display: grid; place-items: center; font: 700 13px var(--display); color: var(--brass2); flex: none; }
.bv { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; }
.bv img { width: 34px; height: 34px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.ticker { background: var(--felt); border-bottom: 1px solid var(--line2); overflow: hidden; white-space: nowrap; font: 500 12.5px var(--mono); height: 32px; }
.ticker .track { display: inline-flex; gap: 30px; padding: 7px 0; animation: run 70s linear infinite; }
.ticker .track > span { display: inline-flex; gap: 8px; }
.ticker b { color: #fff; }
.ticker .head { color: var(--brass2); }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

.top { display: flex; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.stat { padding: 12px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stat .k { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.stat .v { font: 700 19px/1.25 var(--mono); margin-top: 6px; white-space: nowrap; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.stat.cash .v { color: var(--brass2); font-size: 22px; }
.top .spacer { flex: 1; }
.iconbtn { background: none; border: 0; border-left: 1px solid var(--line); padding: 0 20px; cursor: pointer; position: relative; font-size: 18px; color: var(--muted); }
.iconbtn:hover { background: var(--panel); color: var(--ink); }
.iconbtn .dot { position: absolute; top: 12px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--down); color: #fff; font: 700 11px/18px var(--mono); }

.announce { background: var(--brass); color: var(--brass-ink); padding: 8px 28px; font-weight: 600; }
.alert { padding: 10px 28px; font-weight: 600; border-bottom: 1px solid var(--line); }
.alert.bad { background: #3a1712; color: #ffd0c6; }
.alert.warn { background: #3a2c10; color: #ffe2a8; }
.page { padding: 26px 28px 60px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; font-stretch: 112%; font-weight: 850; }
.page-head p { color: var(--muted); max-width: 70ch; margin-top: 4px; }

/* ---------- Byggesten ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card.flat { background: transparent; }
.card h3 { font-size: 17px; font-weight: 750; }
.card .k { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-side { grid-template-columns: 1fr; } }
.big { font: 700 26px/1.2 var(--mono); }
.label { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--mono); text-align: right; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--panel3); border-color: var(--dim); }
.btn.primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.btn.primary:hover { background: var(--brass2); border-color: var(--brass2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel2); color: var(--ink); }
.btn.danger { background: transparent; border-color: #5a2a22; color: var(--down); }
.btn.danger:hover { background: #2c1410; }
.btn.good { background: #173d2b; border-color: #22603f; color: var(--up); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 12px 20px; font-size: 16px; }
.btn[disabled], .btn.off { opacity: .45; cursor: not-allowed; }
.btn .num { font-size: 12.5px; font-weight: 500; opacity: .85; }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; } .btn-group .btn:first-child { border-radius: 6px 0 0 6px; } .btn-group .btn:last-child { border-radius: 0 6px 6px 0; } .btn-group .btn + .btn { margin-left: -1px; }

.input, select.input, textarea.input { width: 100%; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line2); background: var(--bg); color: var(--ink); }
.input:focus { border-color: var(--brass); outline: none; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
label.field small { font-weight: 400; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--brass); }
input[type=range] { accent-color: var(--brass); width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font: 600 12px/1.5 var(--mono); background: var(--panel3); color: var(--muted); white-space: nowrap; }
.chip.up { background: #123524; color: var(--up); } .chip.down { background: #3a1814; color: var(--down); } .chip.brass { background: #3a2f17; color: var(--brass2); } .chip.info { background: #14283a; color: var(--info); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--down); color: #fff; font: 700 11px var(--mono); }
.badge.brass { background: var(--brass); color: var(--brass-ink); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 9px 14px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brass); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
table.t td.nw, table.t td b { white-space: nowrap; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--panel2); }
table.t tr.sel td { background: var(--panel3); }
table.t tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--brass); }

.bar { height: 6px; border-radius: 3px; background: var(--panel3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brass); border-radius: 3px; }
.bar.up > i { background: var(--up); }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--r); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.help { background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--info); border-radius: 6px; padding: 12px 14px; color: var(--muted); font-size: 14px; }
.help b { color: var(--ink); }
.loading { padding: 40px; text-align: center; color: var(--dim); }

/* ---------- Virksomheder ---------- */
.biz { display: grid; grid-template-columns: 54px minmax(0, 1.2fr) minmax(150px, .8fr) 130px auto; gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.biz:last-child { border-bottom: 0; }
.biz .ico { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 28px; background: var(--felt); border: 1px solid var(--line2); }
.biz h4 { font-size: 16px; font-weight: 750; font-family: var(--body); }
.biz .meta { color: var(--muted); font-size: 13px; }
.biz .lvl { display: grid; gap: 5px; }
.biz .lvl .row { justify-content: space-between; font-size: 12.5px; }
.biz .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.biz .income { font: 700 16px var(--mono); color: var(--up); }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.shop-item { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer; display: grid; gap: 6px; align-content: start; color: var(--ink); }
.shop-item:hover { border-color: var(--brass); background: var(--panel2); }
.shop-item .ico { font-size: 30px; line-height: 1; }
.shop-item h4 { font-family: var(--body); font-weight: 700; font-size: 15px; }
.shop-item .price { font: 700 15px var(--mono); color: var(--brass2); }
.shop-item.cant .price { color: var(--dim); }
.shop-item.cant { opacity: .7; }
.shop-item p { font-size: 13px; color: var(--muted); }

/* ---------- Diagram ---------- */
.chart { width: 100%; height: 200px; display: block; }
.chart.small { height: 120px; }

/* ---------- Modal og beskeder ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(3, 8, 6, .72); display: grid; place-items: center; z-index: 100; padding: 24px; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal.wide { width: min(880px, 100%); }
.modal header { padding: 18px 20px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal header h2 { font-size: 21px; font-weight: 800; }
.modal .body { padding: 16px 20px 20px; display: grid; gap: 14px; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 200; width: 340px; }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--brass); border-radius: 8px; padding: 11px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.4); display: flex; gap: 10px; animation: pop .25s ease-out; }
.toast.bad { border-left-color: var(--down); } .toast.good { border-left-color: var(--up); }
.toast .ti { font-size: 20px; }
.toast b { display: block; } .toast span { color: var(--muted); font-size: 13px; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; background: var(--panel); border-left: 1px solid var(--line2); z-index: 90; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.4); }
.drawer header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer .list { overflow-y: auto; }
.note { padding: 12px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.note.unread { background: var(--panel2); }
.note .ti { font-size: 20px; width: 26px; text-align: center; }
.note b { display: block; font-size: 14px; } .note p { color: var(--muted); font-size: 13px; } .note time { color: var(--dim); font-size: 11.5px; font-family: var(--mono); }

/* ---------- Guide-missionen ---------- */
.mission { background: linear-gradient(120deg, #2a2210, var(--panel) 60%); border: 1px solid #5a4620; border-radius: var(--r); padding: 12px 18px; display: flex; gap: 18px; align-items: center; }
.mission .step { font: 700 12px var(--mono); color: var(--brass2); letter-spacing: .08em; text-transform: uppercase; }
.mission h3 { font-size: 17px; margin: 2px 0; }
.mission p { color: var(--muted); font-size: 14px; }
.mission .reward { font: 700 18px var(--mono); color: var(--brass2); white-space: nowrap; }
.steps { display: flex; gap: 4px; margin-top: 10px; }
.steps i { width: 26px; height: 5px; border-radius: 3px; background: var(--panel3); }
.steps i.done { background: var(--brass); } .steps i.now { background: var(--brass2); box-shadow: 0 0 0 2px #5a4620; }

/* ---------- Nyheder ---------- */
.news { display: grid; gap: 0; }
.news-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .ti { font-size: 22px; }
.news-item b { display: block; }
.news-item p { color: var(--muted); font-size: 14px; }
.news-item time { color: var(--dim); font: 12px var(--mono); white-space: nowrap; }

/* ---------- Guide ---------- */
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; align-items: start; }
.guide nav { position: sticky; top: 90px; display: grid; gap: 2px; }
.guide nav a { color: var(--muted); padding: 5px 10px; border-radius: 5px; font-size: 14px; }
.guide nav a:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.guide article { max-width: 760px; }
.guide section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.guide h2 { font-size: 24px; font-stretch: 110%; font-weight: 800; margin-bottom: 10px; }
.guide p, .guide li { color: #d4dbd2; line-height: 1.65; }
.guide p + p { margin-top: 10px; }
.guide ul, .guide ol { padding-left: 20px; margin: 10px 0; display: grid; gap: 4px; }
.guide .tip { margin-top: 12px; }

/* ---------- Login-forsiden ---------- */
.landing { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) 460px; }
.landing .hero { padding: 56px 60px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 20% 0%, #1d3a2b 0%, var(--bg) 60%); border-right: 1px solid var(--line); }
.landing .wordmark { font-size: clamp(80px, 9vw, 140px); line-height: .85; }
.landing .thesis { font: 650 30px/1.2 var(--display); max-width: 18ch; margin: 22px 0 28px; }
.landing .feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 30px; max-width: 640px; }
.landing .feats div { border-top: 1px solid var(--line2); padding-top: 10px; }
.landing .feats b { display: block; font-family: var(--display); font-size: 16px; }
.landing .feats span { color: var(--muted); font-size: 14px; }
.landing .hero .bv { margin-top: auto; padding-top: 30px; }
.landing .form { padding: 56px 44px; display: flex; flex-direction: column; justify-content: center; gap: 18px; background: var(--bg2); }
.landing .form h2 { font-size: 26px; font-weight: 850; }
.err { background: #3a1712; color: #ffd0c6; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.ok { background: #123524; color: #bff3d8; padding: 10px 12px; border-radius: 6px; font-size: 14px; }

/* ---------- Profil og præstationer ---------- */
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ach { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; background: var(--panel); }
.ach .ti { font-size: 24px; }
.ach b { font-size: 14px; display: block; } .ach span { color: var(--muted); font-size: 12.5px; }
.ach.locked { opacity: .45; filter: grayscale(1); }

.strategy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.strategy button { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; cursor: pointer; color: var(--ink); display: grid; gap: 6px; align-content: start; }
.strategy button:hover { border-color: var(--dim); }
.strategy button.on { border-color: var(--brass); background: #241e10; }
.strategy b { font-family: var(--display); font-size: 17px; }
.strategy .pct { font: 700 13px var(--mono); color: var(--brass2); }
.strategy p { color: var(--muted); font-size: 13.5px; }

.ladder { display: grid; gap: 8px; }
.ladder .step { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ladder .step.have { border-color: #22603f; background: #10261b; }
.ladder .step.next { border-color: var(--brass); }
.ladder .h { font: 800 22px var(--mono); color: var(--brass2); }
.gauge { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--down), var(--warn), var(--up)); position: relative; }
.gauge i { position: absolute; top: -5px; width: 4px; height: 20px; background: #fff; border-radius: 2px; transform: translateX(-2px); }
.nw { white-space: nowrap; }
.statlink { color: inherit; display: block; } .statlink:hover { background: var(--panel); text-decoration: none; }
