/* StorageNOI · Clear Sky. Owner app, tenant portal, marketing. Mobile-first.
   Layout: light top bar + horizontal tabs on desktop, bottom tab bar on phones.
   Look: white and pale blue-grey surfaces, navy ink, one cobalt accent, hairline borders,
   bright green reserved for numbers that went up. */
:root {
  --ink: #0D1B33;
  --ink-2: #33415C;
  --muted: #5B6880;
  --faint: #8A95A8;
  --line: #E3E8EF;
  --line-2: #EEF2F6;
  --bg: #F6F8FB;
  --card: #FFFFFF;
  --accent: #1766E8;        /* action color: 4.9:1 on white */
  --accent-hover: #0F55C7;
  --accent-soft: #E9F1FE;
  --accent-ink: #FFFFFF;
  --up: #12B76A;            /* bright green: up trends (fills, arrows, sparklines) */
  --up-ink: #067647;        /* green text on white */
  --up-bg: #DCFAE6;
  --good: #067647;
  --good-bg: #DCFAE6;
  --warn: #93370D;
  --warn-bg: #FEF0C7;
  --bad: #B42318;
  --bad-bg: #FEE4E2;
  --info: #1849A9;
  --info-bg: #E9F1FE;
  /* legacy names still used by a few templates */
  --gold: var(--accent);
  --gold-ink: var(--accent);
  --brown: var(--ink);
  --cream: var(--accent-soft);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(13,27,51,.04);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: 26px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Brand */
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none !important; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo .wm { font-weight: 600; }
.logo .wm b { font-weight: 800; color: var(--accent); }
.logo .sub { font-weight: 500; font-size: 12px; letter-spacing: 0; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { border-color: #C9D2DE; background: #FBFCFE; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.soft { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 32px; padding: 4px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #9DC1FA; outline-offset: 2px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #D5DCE6; border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; }
input:hover, select:hover, textarea:hover { border-color: #BAC5D3; }
textarea { min-height: 90px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 400; color: var(--ink); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.inline-form { display: inline; }

/* Cards & tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.dark { background: var(--ink); color: #E6ECF5; border-color: var(--ink); }
.card.dark .muted { color: #A7B3C7; }
.card.tint { background: var(--accent-soft); border-color: #D4E3FC; }
.card h2 { margin-bottom: 12px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 960px) { .split-wide { grid-template-columns: 1fr; } }
.kpi .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .note { font-size: 13px; margin-top: 4px; color: var(--muted); }
.up { color: var(--up-ink); }
.down { color: var(--bad); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.trend.up { background: var(--up-bg); color: var(--up-ink); }
.trend.down { background: var(--bad-bg); color: var(--bad); }
.trend.flat { background: var(--line-2); color: var(--muted); }
.trend svg { width: 12px; height: 12px; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num { font-family: var(--mono); font-size: 13px; }
tr.total td { border-top: 1px solid var(--ink); font-weight: 700; }
tr.grand td { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 700; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.pro { background: var(--accent-soft); color: var(--accent); font-size: 11px; letter-spacing: .02em; }
.bar { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar > span.up { background: var(--up); }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.sample-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-bg); padding: 2px 8px; border-radius: 6px; }

/* Flash */
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.flash.success { background: var(--good-bg); color: var(--good); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.info { background: var(--info-bg); color: var(--info); }
.flash.sample { background: var(--card); border-color: var(--line); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.testmode { background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* App shell: left sidebar + slim top bar (desktop), bottom tab bar (phone) */
.sidenav { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 30; display: flex; flex-direction: column; gap: 10px; background: var(--card); border-right: 1px solid var(--line); padding: calc(16px + env(safe-area-inset-top, 0px)) 10px 12px; overflow-y: auto; }
.sidenav > .logo { padding: 2px 8px 4px; font-size: 20px; }
.sidenav .facswitch { padding: 0 4px; }
.sidenav .facswitch select { width: 100%; max-width: none; }
.sn { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.sng { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 5px; }
.sni { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.sni svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.sni .count, .sni .tag { margin-left: auto; }
.sni:hover { background: var(--bg); color: var(--ink); }
.sni.on { background: var(--accent-soft); color: var(--accent); }
.sni.on svg { color: var(--accent); }
.sni .tag { font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 0 5px; line-height: 17px; }
.sns { display: flex; flex-direction: column; margin: 1px 0 4px 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.sns a { padding: 5px 10px; font-size: 13.5px; font-weight: 500; color: var(--muted); border-radius: 7px; text-decoration: none; }
.sns a:hover { color: var(--ink); background: var(--bg); }
.sns a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.snfoot { display: flex; flex-direction: column; gap: 1px; padding-top: 8px; border-top: 1px solid var(--line); }
body:has(.sidenav) { padding-left: 240px; }
.crumb { font-size: 14px; color: var(--muted); white-space: nowrap; }
.crumb b { color: var(--ink); font-weight: 600; }
.crumb span { margin: 0 4px; color: var(--faint); }
.phone-only { display: none; }
@media (max-width: 899px) {
  .sidenav { display: none; }
  body:has(.sidenav) { padding-left: 0; }
  .phone-only { display: inline-flex; }
  .crumb { display: none; }
}

.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1280px; margin: 0 auto; padding: 10px clamp(14px, 3vw, 32px) 0; }
.topbar .bar1 { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; min-height: 52px; }
.topbar .bar1 .facswitch { min-width: 0; }
.topbar .spacer { flex: 1; }
.facswitch select { min-height: 36px; padding: 6px 30px 6px 10px; font-size: 14px; font-weight: 600; background-color: var(--bg); border-color: var(--line); max-width: 280px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px 11px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.count { font-size: 11px; font-weight: 700; background: var(--bad-bg); color: var(--bad); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.tabs .tag, .menu .tag { font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 0 5px; line-height: 17px; text-transform: none; letter-spacing: 0; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 4px; border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.menu .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.menu .pop { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(13,27,51,.12); padding: 8px; z-index: 30; }
.menu .pop a, .menu .pop button { display: flex; justify-content: space-between; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none; }
.menu .pop a:hover, .menu .pop button:hover { background: var(--bg); }
.menu .pop .who { padding: 6px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.main { max-width: 1280px; margin: 0 auto; min-width: 0; padding: 26px clamp(14px, 3vw, 32px) 64px; }
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.pagehead p { margin-top: 4px; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.subtabs a { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.subtabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.bottomnav { display: none; }
@media (max-width: 899px) {
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .bottomnav a svg { width: 23px; height: 23px; }
  .bottomnav a.on { color: var(--accent); }
}
@media (max-width: 760px) {
  .topbar .tabs, .hide-sm { display: none; }
  .topbar .in { padding-top: 8px; }
  .facswitch select { max-width: 170px; }
  .main { padding-top: 18px; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  h1 { font-size: 23px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .bottomnav a svg { width: 23px; height: 23px; }
  .bottomnav a.on { color: var(--accent); }
}
.morelist { display: grid; gap: 8px; }
.morelist a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 600; text-decoration: none; }

/* Steps */
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--muted); }
.steps span.on { background: var(--ink); color: #fff; }
.steps span.done { background: var(--good-bg); color: var(--good); }

/* Marketing (shared with a few app pages; page-specific marketing styles live in marketing.css) */
.mk-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.mk-nav .in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.mk-nav .links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; font-weight: 500; margin-right: auto; }
.mk-nav .links a { color: var(--ink-2); }
@media (max-width: 760px) { .mk-nav { position: static; } .mk-nav .links { display: none; } }
.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .quad { grid-template-columns: 1fr; } }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hero { padding-top: 72px; padding-bottom: 40px; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.display { font-family: var(--font); font-weight: 700; font-size: clamp(38px, 6vw, 68px); line-height: 1.03; letter-spacing: -0.04em; margin: 18px auto 0; max-width: 940px; }
.lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-2); max-width: 660px; margin: 20px auto 0; line-height: 1.55; }
.section { padding: 88px 0 0; }
.section h2.big { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.035em; line-height: 1.08; font-weight: 700; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.feature.dark { background: var(--ink); color: #E6ECF5; border-color: var(--ink); }
.feature.dark p { color: #A7B3C7; }
.feature h3 { font-size: 21px; margin: 10px 0 8px; letter-spacing: -0.02em; }
.feature p { color: var(--ink-2); }
.tag { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .07em; }
.feature.dark .tag { color: #8DB6FA; }
.compare td, .compare th { padding: 14px 12px; font-size: 15px; }
.price { font-size: 52px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.mk-foot { margin-top: 96px; background: var(--ink); color: #A7B3C7; padding: 48px 0; font-size: 14px; }
.mk-foot a { color: #E6ECF5; }
.cta-band { background: var(--accent); color: #fff; border-radius: 20px; padding: clamp(28px, 5vw, 60px); text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4.4vw, 48px); letter-spacing: -0.035em; color: #fff; }
.checks { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 9px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--up-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067647' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat; }
.heat { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; height: 520px; overflow: hidden; }
.heat i { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle, rgba(23,102,232,.55), rgba(23,102,232,0) 70%); }
pre.lease { white-space: pre-wrap; font: 13px/1.6 var(--mono); background: #FBFCFE; border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-height: 360px; overflow: auto; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
