:root {
  color-scheme: light;
  --paper: #e9e7df;
  --ink: #141512;
  --muted: #6d6d65;
  --line: #b9b8b0;
  --signal: #d8ff3e;
  --danger: #e54838;
  --panel: rgba(255, 255, 255, 0.16);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(20, 21, 18, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 21, 18, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

button, input { font: inherit; }

.board {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 18px;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  grid-template-rows: auto 1fr 1fr auto;
  gap: 12px;
}

.topbar {
  grid-column: 1 / -1;
  min-height: 70px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.monogram {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font: 500 14px/1 "DM Mono", monospace;
}

.identity strong, .identity small { display: block; }
.identity strong { font: 500 15px/1.1 "DM Mono", monospace; letter-spacing: .04em; }
.identity small { color: var(--muted); font: 400 10px/1.5 "DM Mono", monospace; letter-spacing: .12em; }

.clock { text-align: right; font-family: "DM Mono", monospace; }
.clock strong { display: block; font-size: 20px; font-weight: 500; }
.clock span { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.location-picker { position: relative; justify-self: center; }
.location-picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.location-input-wrap { height: 39px; display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.location-input-wrap > span { margin-right: 8px; font-size: 19px; }
.location-picker input { width: 210px; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 13px "DM Mono", monospace; }
.location-picker button { border: 0; background: var(--ink); color: var(--paper); padding: 6px 10px; cursor: pointer; font: 500 10px "DM Mono", monospace; text-transform: uppercase; }
.location-picker button:hover, .location-picker button:focus-visible { background: var(--signal); color: var(--ink); outline: 1px solid var(--ink); }

.suggestions {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 10;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
}
.suggestion { width: 100%; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: transparent; cursor: pointer; font-size: 12px; }
.suggestion:last-child { border-bottom: 0; }
.suggestion:hover, .suggestion:focus-visible { background: var(--signal); outline: 0; }
.suggestion small { display: block; color: var(--muted); }

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 20px;
}

.weather-panel { grid-row: 2 / 4; display: flex; flex-direction: column; }
.services-panel, .portfolio-panel { display: flex; flex-direction: column; }
.social-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 3fr; align-items: center; padding-top: 14px; padding-bottom: 14px; }

.section-label { color: var(--muted); font: 500 10px "DM Mono", monospace; letter-spacing: .1em; }
.section-label span { color: var(--ink); margin-right: 8px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; }

.weather-main { display: flex; justify-content: space-between; align-items: center; flex: 1; min-height: 270px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font: 500 10px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.weather-main h1 { margin: 0; font-size: clamp(90px, 13vw, 166px); font-weight: 400; line-height: .88; letter-spacing: -.08em; }
.weather-main sup { display: inline-block; font-size: .25em; line-height: 1; vertical-align: top; margin: .06em 0 0 .18em; }
.condition { margin: 12px 0 0 7px; font-size: 18px; font-weight: 600; }

.weather-mark { position: relative; width: 145px; height: 125px; margin-right: 18px; }
.weather-mark .sun { position: absolute; width: 88px; height: 88px; right: 0; top: 0; border: 2px solid var(--ink); border-radius: 50%; background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(20,21,18,.12) 5px 7px); }
.weather-mark .cloud { position: absolute; width: 108px; height: 54px; left: 0; bottom: 5px; background: var(--ink); border-radius: 50px 50px 12px 12px; }
.weather-mark .cloud::before { content: ""; position: absolute; width: 57px; height: 57px; left: 20px; top: -25px; background: var(--ink); border-radius: 50%; }

.forecast { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.forecast-day { padding: 14px 10px 4px; border-right: 1px solid var(--line); }
.forecast-day:first-child { padding-left: 0; }
.forecast-day:last-child { border-right: 0; }
.forecast-day span { display: block; color: var(--muted); font: 500 9px "DM Mono", monospace; text-transform: uppercase; }
.forecast-day strong { display: block; margin: 6px 0 2px; font-size: 18px; font-weight: 600; }
.forecast-day small { font: 400 10px "DM Mono", monospace; color: var(--muted); }

.service-summary, .market-state { padding: 4px 7px; border: 1px solid var(--ink); font: 500 9px "DM Mono", monospace; }
.service-summary.good { background: var(--signal); }
.service-summary.bad { color: white; background: var(--danger); }
.services-panel h2 { margin: 9px 0 6px; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.service-list { margin-top: auto; }
.service-row { display: grid; grid-template-columns: 15px 1fr auto auto; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.service-row:last-child { border-bottom: 0; }
.status-dot { width: 9px; height: 9px; background: var(--muted); border: 1px solid var(--ink); border-radius: 50%; }
.status-dot.up { background: var(--signal); }
.status-dot.down { background: var(--danger); }
.service-state, .latency { font: 500 9px "DM Mono", monospace; text-transform: uppercase; }
.latency { width: 55px; color: var(--muted); text-align: right; }
.loading-row { display: block; color: var(--muted); }

.portfolio-total { display: flex; justify-content: space-between; align-items: flex-end; margin: 11px 0 8px; }
.portfolio-total h2 { margin: 0; font-size: 37px; font-weight: 500; letter-spacing: -.055em; }
.performance { margin-bottom: 4px; padding: 5px 8px; background: var(--signal); font: 500 11px "DM Mono", monospace; }
.performance.negative { color: white; background: var(--danger); }
.holdings { margin-top: auto; }
.holding-row { display: grid; grid-template-columns: 54px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 11px; }
.holding-symbol { font: 500 11px "DM Mono", monospace; }
.holding-name { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.holding-value, .holding-pnl { font: 500 10px "DM Mono", monospace; text-align: right; }
.holding-pnl { min-width: 64px; }
.holding-pnl.positive { color: #334b00; }
.holding-pnl.negative { color: var(--danger); }
.empty-state { color: var(--muted); font-size: 12px; }

.social-intro { padding-right: 20px; border-right: 1px solid var(--line); }
.social-intro h2 { margin: 4px 0 0; font-size: 25px; line-height: 1; letter-spacing: -.04em; }
.social-intro p { margin: 6px 0 0; color: var(--muted); font: 500 9px "DM Mono", monospace; letter-spacing: .08em; }
.social-counts { display: grid; grid-template-columns: repeat(3, 1fr); }
.social-stat { min-width: 0; padding: 0 20px; border-right: 1px solid var(--line); }
.social-stat:last-child { border-right: 0; }
.social-stat > span, .social-stat small { display: block; color: var(--muted); font: 500 9px "DM Mono", monospace; letter-spacing: .08em; }
.social-stat strong { display: block; margin: 2px 0; font-size: clamp(25px, 3vw, 39px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.social-stat.disconnected strong { color: var(--muted); }

footer { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; min-height: 22px; color: var(--muted); font: 500 9px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
footer span:first-child { margin-right: auto; color: var(--ink); }
.refresh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); border: 1px solid var(--ink); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

@media (max-width: 760px) {
  .board { width: min(100% - 20px, 620px); display: flex; flex-direction: column; padding-top: 10px; }
  .topbar { grid-template-columns: 1fr auto; gap: 10px; padding: 8px 0; }
  .location-picker { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .location-input-wrap input { width: 100%; }
  .clock { grid-column: 2; grid-row: 1; }
  .weather-main { min-height: 250px; }
  .weather-mark { transform: scale(.72); transform-origin: right center; margin-right: 0; }
  .weather-main h1 { font-size: 104px; }
  .forecast-day:nth-child(4) { display: none; }
  .forecast { grid-template-columns: repeat(3, 1fr); }
  .social-panel { display: block; }
  .social-intro { padding: 0 0 12px; border: 0; }
  .social-counts { border-top: 1px solid var(--line); padding-top: 12px; }
  .social-stat { padding: 0 10px; }
  .social-stat:first-child { padding-left: 0; }
  .social-stat strong { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) { .refresh-dot { animation: none; } }

@media print {
  body { background: white; }
  .board { width: 800px; height: 480px; min-height: 480px; padding: 8px; grid-template-columns: 340px 1fr; grid-template-rows: 48px 1fr 1fr 16px; gap: 6px; }
  .topbar { min-height: 48px; }
  .panel { padding: 11px; }
  .weather-main { min-height: auto; }
  .weather-main h1 { font-size: 94px; }
  .weather-mark { transform: scale(.65); transform-origin: right center; }
  .services-panel h2 { font-size: 20px; }
  .service-row { padding: 4px 0; }
  .portfolio-total h2 { font-size: 28px; }
  .holding-row { padding: 3px 0; }
  .location-picker { display: none; }
  .social-panel { display: none; }
}
