/* ============================================
   EiendomsLogg — design tokens (blueprint / måltegning)
   ============================================ */
:root {
  --blue-deep: #0E2540;
  --blue-mid: #16324F;
  --blue-soft: #1D3E5E;
  --blue-softer: #274B6E;
  --grid-line: rgba(233,238,245,0.05);
  --line: rgba(233,238,245,0.14);
  --line-strong: rgba(233,238,245,0.28);
  --plan-line: rgba(233,238,245,0.55);

  --paper: #F7F4EA;
  --paper-2: #ECE6D2;
  --pencil: #26364A;
  --pencil-muted: #6B7A8C;

  --ink-text: #E9EEF5;
  --muted: #91A7C0;

  --safety: #E8622C;
  --safety-dark: #C14F1D;
  --green: #4E9A6E;
  --green-dark: #3A7853;
  --amber: #D9A441;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --wrap: 1220px;
  --radius: 3px;
  --radius-lg: 7px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

html, body { height: 100%; }
body {
  margin: 0;
  background-color: var(--blue-deep);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-text);
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 1em; }
a { color: var(--safety); text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.mono { font-family: var(--font-mono); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--safety);
  outline-offset: 2px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px;
  padding: 12px 22px; border-radius: var(--radius); border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap; background: transparent; color: var(--ink-text);
  letter-spacing: 0.01em;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--safety); color: #1A0D06; border-color: var(--safety); }
.btn-primary:hover:not(:disabled) { background: var(--safety-dark); border-color: var(--safety-dark); }

.btn-secondary { background: var(--green); color: #0B1A12; border-color: var(--green); }
.btn-secondary:hover:not(:disabled) { background: var(--green-dark); border-color: var(--green-dark); }

.btn-ghost { background: transparent; color: var(--ink-text); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-text); background: rgba(233,238,245,0.05); }

.btn-danger { background: transparent; color: #F0876A; border-color: rgba(232,98,44,0.5); }
.btn-danger:hover:not(:disabled) { background: rgba(232,98,44,0.12); }

.btn-small { padding: 8px 15px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px 10px; }

/* ============================================
   Header + tab nav
   ============================================ */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 37, 64, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 24px 12px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; background: var(--safety); color: #1A0D06;
  border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.logo-word { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.logo-word em { color: var(--safety); font-style: normal; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.tab-nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 700;
  color: var(--muted); background: transparent; border: none;
  border-bottom: 2px solid transparent; padding: 12px 13px 10px;
  cursor: pointer; white-space: nowrap; letter-spacing: 0.01em;
}
.tab-btn:hover { color: var(--ink-text); }
.tab-btn.active { color: var(--ink-text); border-bottom-color: var(--safety); }

/* ============================================
   Main layout
   ============================================ */
.app-main { flex: 1; }
.view-wrap { max-width: var(--wrap); margin: 0 auto; padding: 32px 24px 80px; }
.view-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 24px; flex-wrap: wrap;
}
.view-head p { color: var(--muted); margin: 6px 0 0; max-width: 60ch; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================
   Cards / surfaces
   ============================================ */
.card {
  background: var(--blue-mid); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 24px;
}
.card + .card { margin-top: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-card { background: var(--blue-mid); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.stat-value { font-family: var(--font-display); font-size: 27px; font-weight: 800; color: var(--ink-text); }
.stat-value.stamp-color { color: var(--safety); }
.stat-value.sage-color { color: var(--green); }
.stat-value.amber-color { color: var(--amber); }

.section-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--green); margin-bottom: 14px; text-transform: uppercase; }

/* ============================================
   Empty states
   ============================================ */
.empty-state { text-align: center; padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty-state::before {
  content: '';
  display: block; width: 38px; height: 38px; margin: 0 auto 16px;
  background-color: var(--muted); opacity: 0.55;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M3 12h4l2 3h6l2-3h4'/%3E%3Cpath d='M5 12V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v6'/%3E%3Crect x='3' y='12' width='18' height='7' rx='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M3 12h4l2 3h6l2-3h4'/%3E%3Cpath d='M5 12V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v6'/%3E%3Crect x='3' y='12' width='18' height='7' rx='2'/%3E%3C/svg%3E");
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.empty-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.empty-body { color: var(--muted); margin-bottom: 20px; }

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em;
  padding: 4px 9px; border-radius: 999px; border: 1px solid transparent;
  text-transform: uppercase;
}
.badge-open { background: rgba(232,98,44,0.14); color: #F0876A; border-color: rgba(232,98,44,0.35); }
.badge-progress { background: rgba(217,164,65,0.14); color: var(--amber); border-color: rgba(217,164,65,0.35); }
.badge-done { background: rgba(78,154,110,0.16); color: var(--green); border-color: rgba(78,154,110,0.35); }
.badge-neutral { background: rgba(233,238,245,0.08); color: var(--muted); border-color: var(--line-strong); }

.type-tag { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================================
   Property cards
   ============================================ */
.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.property-card {
  background: var(--blue-mid); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease;
  text-align: left; width: 100%; color: inherit; font: inherit;
}
.property-card:hover { border-color: var(--safety); transform: translateY(-2px); }
.property-card h3 { margin-bottom: 2px; }
.property-address { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.property-meta-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; gap: 10px; flex-wrap: wrap; }
.property-tenant { font-size: 13px; color: var(--muted); }
.property-open-count { font-family: var(--font-mono); font-size: 11.5px; }

/* ============================================
   Tables / lists
   ============================================ */
.data-table { width: 100%; border-collapse: collapse; }
.card:has(.data-table) { overflow-x: auto; }
.data-table th {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: left; color: var(--muted); padding: 0 12px 10px; border-bottom: 1px solid var(--line-strong);
}
.data-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num { font-family: var(--font-mono); }

.entry-row-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.entry-row-desc { color: var(--muted); font-size: 13.5px; margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.thumb-strip { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; border: 1px solid var(--line-strong); cursor: pointer; }
.thumb-wrap { position: relative; display: inline-block; line-height: 0; }
.thumb-remove {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--safety); color: #1A0D06; border: 1px solid var(--blue-deep); font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.thumb-remove:hover { background: var(--safety-dark); }
.doc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  background: rgba(233,238,245,0.06); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: var(--radius); margin: 8px 6px 0 0;
}
.doc-chip-remove { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 4px; }
.doc-chip-remove:hover { color: var(--safety); }

/* ============================================
   Filter bar
   ============================================ */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-bar select, .filter-bar input {
  background: var(--blue-mid); border: 1px solid var(--line-strong); color: var(--ink-text);
  border-radius: var(--radius); padding: 9px 12px; font-family: var(--font-body); font-size: 14px;
}

/* ============================================
   Forms
   ============================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.form-field input, .form-field select, .form-field textarea {
  background: rgba(233,238,245,0.04); border: 1px solid var(--line-strong); color: var(--ink-text);
  border-radius: var(--radius); padding: 11px 13px; font-family: var(--font-body); font-size: 15px; width: 100%;
}
.form-field textarea { resize: vertical; min-height: 80px; }
.form-field .hint { font-size: 12px; color: var(--muted); }
.form-field .error-text { font-size: 12.5px; color: var(--safety); display: none; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--safety); }
.form-field.has-error .error-text { display: block; }

.file-drop {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px;
  text-align: center; cursor: pointer; color: var(--muted); font-size: 13px;
}
.file-drop:hover { border-color: var(--green); color: var(--ink-text); }
.file-drop input { display: none; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(6,15,26,0.75);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--blue-deep); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  width: 100%; max-width: 620px; padding: 28px 30px; box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.modal-close { background: transparent; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--ink-text); }

/* ============================================
   Wizard (inspection)
   ============================================ */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 26px; }
.wizard-step-dot { flex: 1; height: 3px; border-radius: 2px; background: var(--line-strong); }
.wizard-step-dot.active { background: var(--safety); }
.wizard-step-dot.done { background: var(--green); }

.room-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.room-block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.room-block-head h4 { margin: 0; font-family: var(--font-display); font-size: 15px; }
.condition-select-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.condition-pill {
  flex: 1; min-width: 80px; text-align: center; padding: 8px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 12px;
  cursor: pointer; color: var(--muted); background: transparent; text-transform: uppercase;
}
.condition-pill.selected.cond-god { background: rgba(78,154,110,0.16); border-color: var(--green); color: var(--green); }
.condition-pill.selected.cond-ok { background: rgba(217,164,65,0.16); border-color: var(--amber); color: var(--amber); }
.condition-pill.selected.cond-darlig { background: rgba(232,98,44,0.16); border-color: var(--safety); color: #F0876A; }

.signature-pad-wrap { text-align: center; }
.signature-pad { width: 100%; height: 160px; background: var(--paper); border-radius: var(--radius); touch-action: none; cursor: crosshair; }
.signature-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================
   Report / print view
   ============================================ */
.report-card-preview { background: var(--blue-mid); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; cursor: pointer; transition: border-color 0.15s ease; }
.report-card-preview:hover { border-color: var(--safety); }
.report-head-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 10px; }

.report-doc { background: var(--paper); color: var(--pencil); border-radius: var(--radius-lg); padding: 40px 44px; }
.report-doc h2, .report-doc h3, .report-doc h4 { color: var(--pencil); font-family: var(--font-display); }
.report-doc .doc-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; color: var(--safety-dark); margin-bottom: 6px; text-transform: uppercase; }
.report-doc-meta { display: flex; gap: 28px; flex-wrap: wrap; margin: 16px 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--paper-2); }
.report-doc-meta div span { display: block; }
.report-doc-meta .meta-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; color: var(--pencil-muted); margin-bottom: 3px; text-transform: uppercase; }
.report-doc-meta .meta-value { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.report-room { padding: 14px 0; border-bottom: 1px solid var(--paper-2); }
.report-room:last-child { border-bottom: none; }
.report-room-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 10px; flex-wrap: wrap; }
.report-room-notes { color: #4A4436; font-size: 14px; margin: 0 0 8px; }
.report-sign-row { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.report-sign-block { flex: 1; min-width: 200px; }
.report-sign-block img { width: 100%; max-width: 260px; height: 90px; object-fit: contain; background: #fff; border-radius: 3px; border: 1px solid var(--paper-2); }
.report-sign-block p { margin: 6px 0 0; font-family: var(--font-mono); font-size: 11px; color: var(--pencil-muted); text-transform: uppercase; }

/* ============================================
   Toast
   ============================================ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #0B1A12; font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  padding: 12px 20px; border-radius: var(--radius); z-index: 300; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5);
}
.toast[hidden] { display: none; }
.toast.toast-danger { background: var(--safety); color: #1A0D06; }

/* ============================================
   Property detail
   ============================================ */
.detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; margin-bottom: 16px; background: none; border: none; cursor: pointer; padding: 0; text-transform: uppercase; }
.detail-back:hover { color: var(--ink-text); }
.detail-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 28px; }
.timeline-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-date { width: 84px; flex-shrink: 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); padding-top: 2px; }
.timeline-body { flex: 1; min-width: 0; }

/* ============================================================
   MARKETING HEADER
   ============================================================ */
.marketing-header { position: sticky; top: 0; z-index: 50; background: rgba(14, 37, 64, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.marketing-header-inner { max-width: var(--wrap); margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 20px; }
.marketing-nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.marketing-nav-links a { color: var(--muted); font-family: var(--font-display); font-size: 14px; font-weight: 700; cursor: pointer; }
.marketing-nav-links a:hover { color: var(--ink-text); }

/* ============================================================
   APP HEADER (account)
   ============================================================ */
.account-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px 6px 6px; }
.account-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #0B1A12; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 11px; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-wrap { padding: 0; max-width: none; }
.lp-section { padding: 88px 0; }
.lp-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.lp-section.tinted { background: var(--blue-mid); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow { color: var(--green); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.09em; margin-bottom: 16px; text-transform: uppercase; }
.eyebrow::before { content: '▪ '; }

.lp-hero { padding: 64px 0 88px; overflow: hidden; }
.lp-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lp-hero h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.12; margin-bottom: 20px; }
.lp-hero-lede { font-size: 17px; color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.lp-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.lp-hero-note { font-size: 13px; color: var(--muted); margin: 0; }

.lp-section h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); max-width: 24ch; }
.lp-lede { color: var(--muted); font-size: 16.5px; max-width: 62ch; margin-bottom: 44px; }

/* ---- Signature hero: annotated floor plan ---- */
.plan-visual { position: relative; width: 100%; }
.plan-frame {
  position: relative;
  background: var(--blue-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.plan-frame::before, .plan-frame::after {
  content: ''; position: absolute; width: 22px; height: 22px;
  border-color: var(--safety); border-style: solid; border-width: 0;
}
.plan-frame::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.plan-frame::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.plan-canvas { position: relative; }
.plan-svg { width: 100%; height: auto; display: block; }
.plan-room-label { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-text); text-anchor: middle; letter-spacing: 0.04em; }
.plan-dim-text { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); text-anchor: middle; }
.plan-tag {
  position: absolute; display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper); color: var(--pencil); font-family: var(--font-mono); font-size: 11px;
  padding: 6px 10px; border-radius: var(--radius); box-shadow: 0 10px 22px -8px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.plan-tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.plan-tag-dot.warn { background: var(--safety); }
.plan-caption { margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---- How it works ---- */
.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.how-step { background: var(--blue-deep); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 20px; }
.how-step-icon { width: 42px; height: 42px; border-radius: var(--radius); background: rgba(78,154,110,0.14); color: var(--green); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.how-step h3 { font-size: 15.5px; margin-bottom: 6px; }
.how-step p { color: var(--muted); font-size: 13.5px; margin: 0; }
.how-step-num { font-family: var(--font-mono); font-size: 10.5px; color: var(--safety); margin-bottom: 10px; text-transform: uppercase; }

/* ---- Feature grid ---- */
.lp-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.lp-feature-card { background: var(--blue-mid); padding: 26px 24px; transition: background 0.2s ease; }
.lp-feature-card:hover { background: var(--blue-soft); }
.lp-feature-icon { width: 38px; height: 38px; border-radius: var(--radius); background: rgba(232,98,44,0.14); color: var(--safety); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.lp-feature-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.lp-feature-card p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ---- Pricing ---- */
.pricing-wrap { display: flex; justify-content: center; }
.pricing-card { position: relative; background: var(--blue-mid); border: 1.5px solid var(--green); border-radius: var(--radius-lg); padding: 36px 40px; max-width: 400px; width: 100%; text-align: center; }
.pricing-badge { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: #0B1A12; background: var(--green); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; text-transform: uppercase; }
.pricing-price { font-family: var(--font-display); font-size: 42px; font-weight: 800; margin-bottom: 4px; }
.pricing-price span { font-family: var(--font-mono); font-size: 14px; color: var(--muted); font-weight: 400; }
.pricing-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.pricing-features { text-align: left; margin-bottom: 28px; }
.pricing-features li { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--ink-text); }
.pricing-features li::before { content: "✓"; color: var(--green); font-family: var(--font-mono); flex-shrink: 0; }

/* ---- Footer ---- */
.lp-footer { padding: 44px 0 40px; }
.lp-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrap { max-width: 400px; margin: 56px auto; padding: 0 20px; }
.auth-card { background: var(--blue-mid); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 32px; }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-card .lp-lede { margin-bottom: 22px; font-size: 14.5px; max-width: none; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.auth-switch a { color: var(--green); cursor: pointer; font-weight: 700; }
.auth-error { background: rgba(232,98,44,0.12); border: 1px solid rgba(232,98,44,0.35); color: #F0876A; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 18px; }

/* ============================================================
   PAYWALL
   ============================================================ */
.paywall-wrap { max-width: 600px; margin: 48px auto 76px; padding: 0 20px; text-align: center; }
.paywall-lock { width: 54px; height: 54px; border-radius: var(--radius-lg); background: rgba(232,98,44,0.14); color: var(--safety); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.paywall-wrap h1 { font-size: 1.6rem; }
.paywall-wrap .lp-lede { margin: 0 auto 30px; }
.demo-note { margin-top: 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .plan-visual { order: -1; }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .marketing-nav-links { gap: 12px; }
  .marketing-nav-links a.btn { padding: 8px 14px; }
  .lp-section { padding: 52px 0; }
  .lp-hero { padding: 40px 0 52px; }
  .how-steps { grid-template-columns: 1fr; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 26px 22px; }
  .auth-card { padding: 26px 20px; }
  .app-header-inner { padding: 14px 16px 10px; }
  .tab-nav { padding: 0 16px; }
  .view-wrap { padding: 22px 16px 60px; }
  .modal { padding: 22px 18px; }
  .report-doc { padding: 24px 18px; }
}
@media (max-width: 480px) {
  .account-name { display: none; }
  .account-pill { padding: 4px; border: none; }
  .header-actions .btn span.full-label { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .condition-select-row { flex-wrap: wrap; }
  .condition-pill { min-width: 80px; }
  .view-head h1 { font-size: 1.5rem; }
  .signature-pad { height: 130px; }
  .plan-tag { font-size: 9.5px; padding: 4px 7px; }
}

/* ============================================
   Print
   ============================================ */
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; top: 0; left: 0; width: 100%; }
  .no-print { display: none !important; }
}
