/* Toronto Building Permit Feed — modern design system (2026-11-11 redesign) */
:root {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --slate: #475569;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f8fafc;
  --card: #ffffff;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: #fff7ed;
  --accent-line: #fed7aa;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --green-line: #bbf7d0;
  --amber-soft: #fffbeb;
  --amber-line: #fde68a;
  --blue-soft: #eff6ff;
  --blue-line: #bfdbfe;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, .12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5rem; }
h2 { font-size: 1.75rem; font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
::selection { background: var(--accent-line); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: .8rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(234, 88, 12, .35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; line-height: 1; margin-top: 2px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.main-nav a {
  color: var(--slate); font-size: .92rem; font-weight: 600;
  padding: .45rem .7rem; border-radius: 8px;
}
.main-nav a:hover { color: var(--ink); background: var(--line-soft); text-decoration: none; }
.main-nav a.nav-cta {
  background: var(--ink); color: #fff; padding: .5rem .95rem; margin-left: .35rem;
}
.main-nav a.nav-cta:hover { background: var(--ink-soft); }
.main-nav a.nav-login { color: var(--ink); }
.nav-user { font-size: .85rem; color: var(--muted); padding: 0 .4rem; }

/* ---------- Layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem 4rem; }
.page { padding-top: 2.5rem; }
.page-narrow { max-width: 680px; margin: 0 auto; }
.section { margin-top: 3rem; }
.section-head { margin-bottom: 1.25rem; }
.section-head p { color: var(--slate); max-width: 640px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--accent-dark);
  margin-bottom: .6rem;
}
.lede { font-size: 1.13rem; color: var(--slate); max-width: 680px; }
.muted { color: var(--muted); font-size: .92rem; }
.small { font-size: .85rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 320px at 85% -10%, rgba(234, 88, 12, .28), transparent 60%),
    radial-gradient(700px 300px at 10% 110%, rgba(245, 158, 11, .14), transparent 55%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  border-radius: 0 0 28px 28px;
  margin: 0 0 2.5rem;
}
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 4rem 1.25rem 3.25rem; }
.hero .eyebrow { color: #fdba74; }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; color: #fff;
  letter-spacing: -0.03em; line-height: 1.08; max-width: 720px; margin-bottom: 1rem;
}
.hero h1 .accent { color: #fb923c; }
.hero p.lede { color: #cbd5e1; font-size: 1.15rem; max-width: 660px; }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.75rem 0 2.5rem; }
.hero-stats {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 1.5rem;
}
.stat b { display: block; font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.stat span { font-size: .85rem; color: #94a3b8; }

/* ---------- Buttons ---------- */
.btn, button {
  display: inline-block; font-family: var(--font);
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-size: .98rem; font-weight: 700; line-height: 1;
  padding: .85rem 1.4rem; border-radius: 10px; text-decoration: none;
  box-shadow: 0 2px 10px rgba(234, 88, 12, .3);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover, button:hover { background: var(--accent-dark); text-decoration: none; }
.btn:active, button:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); box-shadow: 0 2px 10px rgba(15, 23, 42, .25); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost {
  background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none;
  border: 1px solid rgba(255, 255, 255, .35);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-secondary:hover { background: var(--line-soft); }
.btn-sm { padding: .55rem .9rem; font-size: .88rem; border-radius: 8px; }

/* ---------- Cards & grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--slate); font-size: .96rem; margin-bottom: 0; }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: .9rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  font-size: 1.25rem;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step-num {
  position: absolute; top: 1.4rem; left: 1.4rem;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-top: .35rem; }

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow-x: auto; margin-top: 1rem;
}
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
thead th {
  background: #f8fafc; font-size: .76rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; position: sticky; top: 0;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.addr { font-weight: 600; color: var(--ink); }
td .sub { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }

.pill {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: .18rem .55rem; border-radius: 999px; white-space: nowrap;
  background: var(--blue-soft); color: #1d4ed8; border: 1px solid var(--blue-line);
}
.pill-green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.pill-amber { background: var(--amber-soft); color: #92400e; border-color: var(--amber-line); }
.pill-slate { background: #f1f5f9; color: var(--slate); border-color: var(--line); }
.pill-orange { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-line); }

/* ---------- Filters ---------- */
.filter-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.filter-grid { display: flex; flex-wrap: wrap; gap: .9rem 1.1rem; align-items: end; }
.filter-grid label { font-size: .8rem; font-weight: 700; color: var(--slate); display: block; }
.filter-grid label span { display: block; margin-bottom: .3rem; }
.filter-actions { display: flex; gap: .6rem; }
.result-line { font-size: .92rem; color: var(--slate); margin: 1rem 0 0; }

/* ---------- Forms ---------- */
input, select, textarea {
  font-family: var(--font); font-size: 1rem; color: var(--ink);
  padding: .65rem .8rem; border: 1px solid #cbd5e1; border-radius: 9px;
  background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .18);
}
select { width: auto; min-width: 10rem; }
label.block { display: block; font-weight: 600; font-size: .92rem; margin: 1rem 0 .35rem; }
input.block { display: block; width: 100%; max-width: 28rem; }
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.75rem; margin-top: 1.25rem;
}
.form-card h3 { margin-top: 0; }
.divider { border: none; border-top: 1px solid var(--line); margin: 1.75rem 0; }

/* ---------- Notices ---------- */
.notice {
  background: var(--amber-soft); border: 1px solid var(--amber-line);
  border-radius: 10px; padding: .9rem 1.1rem; margin: 1rem 0; font-size: .95rem;
}
.notice.info { background: var(--blue-soft); border-color: var(--blue-line); }
.success {
  background: var(--green-soft); border: 1px solid var(--green-line);
  border-radius: 10px; padding: .9rem 1.1rem; margin: 1rem 0;
}
.flash {
  background: var(--blue-soft); border: 1px solid var(--blue-line);
  border-radius: 10px; padding: .9rem 1.1rem; margin: 1rem auto; max-width: 1120px;
}
.price { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.price-card { text-align: left; }
.price-card .price { color: var(--accent-dark); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; background: #fff; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 2rem 1.25rem; font-size: .88rem; color: var(--muted); }
.footer-inner p { margin-bottom: .4rem; }
.footer-inner a { color: var(--slate); font-weight: 600; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .75rem; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .grid-3, .steps { grid-template-columns: 1fr; }
  .hero-inner { padding: 2.75rem 1.25rem 2.5rem; }
  .main-nav { margin-left: 0; }
  .header-inner { gap: .75rem; }
  .filter-grid label, .filter-grid select, .filter-grid input { width: 100%; }
  .filter-actions { width: 100%; }
  .page { padding-top: 1.75rem; }
}
