/* Hinnang: hand-written styles, no build step.
   Every colour, size and radius is a token on :root; dark mode only swaps
   tokens. Contrast ratios for the text pairs are noted next to them. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.8e433c0592f7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.ad4eb06671be.woff2") format("woff2");
  /* š ž and the rest of Latin Extended */
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Colour: neutrals */
  /* Cool neutrals, matched to the blue accent so every surface shares one temperature. */
  --bg: #f8f9fb;
  --bg-tint: #e9f0f9;          /* hero */
  --surface: #ffffff;
  --surface-2: #f0f2f6;        /* hover fills, inset areas */
  --band: #eef1f6;             /* muted full-width band (recent reviews) */
  --border: #dfe3ea;
  --border-strong: #c4cad4;
  --text: #14171c;             /* 17.1:1 on --bg */
  --text-muted: #515a67;       /* 6.6:1 on --bg, 6.2:1 on --band, >= 4.8:1 anywhere on the hero */

  /* Colour: accent (Estonian blue: the flag's #0072ce, deepened for contrast)
     and its soft tint for chips */
  --accent: #0062b0;           /* 5.9:1 on --bg, 5.5:1 on --band; white on it 6.2:1 */
  --accent-hover: #004f8f;
  --on-accent: #ffffff;
  --accent-soft: #e5eefa;
  --accent-soft-hover: #d2e2f6;
  --accent-soft-text: #004c8a; /* 7.5:1 on --accent-soft */

  /* Colour: ratings and status */
  --star: #f59e0b;
  --star-empty: #d5dae2;
  --danger: #b42318;           /* 6.6:1 on --surface */
  --warning-bg: #fdf2dd;
  --warning-text: #7a4a00;
  --success-bg: #e3f4ea;
  --success-text: #17603a;
  --focus: #0062b0;

  /* Tile hues (company logos, avatars): lightness of background and text */
  --tile-bg-l: 90%;
  --tile-bg-s: 42%;
  --tile-fg-l: 26%;
  --tile-fg-s: 55%;

  /* Type scale 14/16/18/24/36/48 */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2.25rem;
  --fs-2xl: 3rem;

  /* 8px spacing grid */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-6: 3rem;
  --s-8: 4rem;

  /* Shape and depth */
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-md: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px -6px rgb(16 24 40 / 0.12);

  --control-h: 44px;
  --control-h-lg: 56px;
  --max: 1200px;
  --ease: 180ms cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1115;
    --bg-tint: #10151d;
    --surface: #171a20;
    --surface-2: #1e222a;
    --band: #13161b;           /* between --bg and --surface, so cards stay raised */
    --border: #2a2f38;
    --border-strong: #3b414c;
    --text: #eceef0;           /* 16.3:1 on --bg */
    --text-muted: #a4abb4;     /* 8.2:1 on --bg, 7.5:1 on --surface */

    --accent: #5aa9f5;         /* 7.6:1 on --bg, 7.0:1 on --surface */
    --accent-hover: #8cc4fa;
    --on-accent: #04203d;      /* 6.6:1 on --accent */
    --accent-soft: #132a45;
    --accent-soft-hover: #18355a;
    --accent-soft-text: #a9d1ff; /* 9.2:1 on --accent-soft */

    --star: #fbbf24;
    --star-empty: #3b414c;
    --danger: #f97066;
    --warning-bg: #3a2a0c;
    --warning-text: #fcd38d;
    --success-bg: #11301f;
    --success-text: #9be4b7;
    --focus: #8cc4fa;

    --tile-bg-l: 22%;
    --tile-bg-s: 30%;
    --tile-fg-l: 82%;
    --tile-fg-s: 65%;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -8px rgb(0 0 0 / 0.6);
  }
}

/* Base ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

/* Keep anchor targets (#review) and focused elements clear of the sticky header. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; min-width: 0; outline: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s-2); letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s-2); }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a:focus-visible { border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--s-2); }
@media (min-width: 640px) { .container { padding-inline: var(--s-3); } }
.page { padding-block: var(--s-4) var(--s-8); }
.narrow { max-width: 32rem; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.prewrap { white-space: pre-line; overflow-wrap: anywhere; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
ul.plain { padding-left: 1.2rem; }
.icon { flex: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: var(--s-2); top: -100px; z-index: 100;
  background: var(--surface); color: var(--text); padding: var(--s-1) var(--s-2);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
}
.skip-link:focus { top: var(--s-1); }

/* Buttons: one system, three variants ------------------------------------------ */

.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  height: var(--control-h); padding: 0 var(--s-2);
  font: inherit; font-size: var(--fs-base); font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
/* Unclassed buttons (form submits) are primary. */
button:not(.btn), .btn-primary { background: var(--accent); color: var(--on-accent); }
button:not(.btn):hover, .btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--surface-2); color: var(--danger); }
.btn-lg { height: var(--control-h-lg); padding: 0 var(--s-3); font-size: var(--fs-md); border-radius: var(--radius); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.btn-icon { width: var(--control-h); padding: 0; }
/* Long labels (e.g. "log in to review") may wrap instead of overflowing. */
.btn-wrap { white-space: normal; height: auto; min-height: var(--control-h); padding-block: 10px; text-align: center; line-height: 1.3; }

/* Forms -------------------------------------------------------------------- */

input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], textarea, select {
  width: 100%; min-height: var(--control-h); font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; transition: border-color var(--ease), box-shadow var(--ease);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}
input[type=file] { font: inherit; max-width: 100%; color: var(--text-muted); }
/* The file picker's button matches .btn-secondary. */
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; height: var(--control-h); padding: 0 var(--s-2); margin-right: 12px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); cursor: pointer; transition: border-color var(--ease), color var(--ease);
}
input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
form.stacked + p { margin-top: var(--s-2); }
form.stacked > div { margin-bottom: var(--s-2); }
form.stacked label { display: block; font-weight: 600; margin-bottom: 6px; }
form.stacked .helptext { display: block; color: var(--text-muted); font-size: var(--fs-sm); margin-top: 6px; }
form.stacked .helptext ul { margin: 4px 0; padding-left: 1.2rem; }
form.stacked [id$=_tags] label, form.stacked input[type=checkbox] + label { font-weight: 500; display: inline; }
form.stacked [id$=_tags] { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
form.inline { display: inline; margin: 0; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 0 0 6px; font-size: var(--fs-sm); }

/* Header -------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: var(--s-2); height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-md); letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
/* The hedgehog takes the accent colour, so it follows light and dark mode. */
.mark { width: auto; height: 40px; flex: none; color: var(--accent); fill: currentColor; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links form { margin: 0; }
.nav-desktop { margin-left: auto; }
.nav-mobile { margin-left: auto; display: none; position: relative; }
.nav-mobile > summary { list-style: none; }
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile .icon-close { display: none; }
.nav-mobile[open] .icon-open { display: none; }
.nav-mobile[open] .icon-close { display: block; }
.nav-mobile-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 15rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: var(--s-1);
}
.nav-mobile-panel .nav-links { flex-direction: column; align-items: stretch; }
.nav-mobile-panel .btn { width: 100%; justify-content: flex-start; }
.nav-mobile-panel .btn-primary { justify-content: center; margin-top: 4px; }

@media (max-width: 767px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
}

/* Hero ---------------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(60rem 28rem at 85% -20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg-tint);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 50rem; padding-block: var(--s-8) var(--s-6); text-align: center; }
.hero h1 { font-size: var(--fs-xl); letter-spacing: -0.03em; margin-bottom: var(--s-2); }
.hero .lead { font-size: var(--fs-md); color: var(--text-muted); max-width: 40rem; margin: 0 auto var(--s-4); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 var(--s-4); }
@media (min-width: 768px) {
  .hero h1 { font-size: var(--fs-2xl); }
}

.search-bar {
  display: flex; gap: var(--s-1); padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-bar:focus-within { border-color: var(--focus); box-shadow: var(--shadow-md), 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.search-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 14px; color: var(--text-muted); pointer-events: none; }
.search-bar input[type=search] {
  height: var(--control-h-lg); min-height: 0; border: 0; background: transparent; box-shadow: none;
  padding-left: 48px; font-size: var(--fs-md);
}
.search-bar input[type=search]:focus-visible { box-shadow: none; }
.search-bar .btn { flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-soft-text);
  font-size: var(--fs-sm); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color var(--ease);
}
a.chip:hover { background: var(--accent-soft-hover); color: var(--accent-soft-text); }
.chip.is-active { background: var(--accent); color: var(--on-accent); }
.chips-sm .chip { height: 24px; padding: 0 10px; font-size: 0.8125rem; }

.stats-line { margin: 0 0 var(--s-1); color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.stats-line span + span::before { content: "·"; margin: 0 var(--s-1); color: var(--text-muted); }
.disclaimer { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }

/* Sections ------------------------------------------------------------------ */

.section { margin-top: var(--s-6); }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-2); margin-bottom: var(--s-3);
}
.section-head h2 { margin: 0; }
.add-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; color: var(--text-muted); }
/* Full-width bands on the home page. The hero is tinted, recent activity sits
   on a muted band (secondary content), and the browse section is on the page
   background so the search bar and its results read as one unit. */
.band { padding-block: var(--s-6); }
.band-muted { background: var(--band); border-bottom: 1px solid var(--border); }
.browse { scroll-margin-top: 88px; }
.browse-bar { padding: var(--s-2); margin-bottom: var(--s-3); display: grid; gap: var(--s-2); }
.browse-bar .search-bar { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 4px; box-shadow: none; }
.browse-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-1); }
.chip .icon { margin-left: 4px; margin-right: -2px; }
.result-count { margin: 4px 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.empty-state { padding: var(--s-6) var(--s-3); text-align: center; color: var(--text-muted); }
.empty-state p { margin-bottom: var(--s-2); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Recent reviews: scroll-snap strip on small screens, three columns on wide */

.review-strip {
  list-style: none; margin: 0; padding: 0 0 var(--s-1);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16rem, 85%);
  gap: var(--s-2); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.review-strip > li { scroll-snap-align: start; min-width: 0; }
@media (min-width: 900px) {
  .review-strip { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
}
.review-card { height: 100%; padding: var(--s-3); display: flex; flex-direction: column; gap: 12px; }
.review-card-head { display: flex; align-items: center; gap: 12px; }
.review-card-head .who { min-width: 0; display: flex; flex-direction: column; }
.review-card-head .who a { color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.review-card-head .who a:hover { text-decoration: underline; }
.review-card time { font-size: var(--fs-sm); color: var(--text-muted); }
.review-card .company-link { font-weight: 600; margin: 0; }
.review-card p { margin: 0; color: var(--text); }

/* Company cards ------------------------------------------------------------- */

.company-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .company-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .company-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.company-card {
  position: relative; height: 100%; padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.company-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.company-card:has(.stretched:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.company-card .stretched:focus-visible { outline: none; }
.company-card-head { display: flex; gap: var(--s-2); align-items: flex-start; }
.company-card-title { min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.company-card h3 { margin: 0; font-size: var(--fs-md); line-height: 1.3; overflow-wrap: anywhere; }
.company-card h3 a { color: var(--text); text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
/* Links inside the card stay clickable above the stretched link. */
.company-card .chip, .company-card .cta { position: relative; z-index: 1; }

.rating-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.rating-number { font-size: var(--fs-lg); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.rating-count { color: var(--text-muted); font-size: var(--fs-sm); }
.snippet { margin: 0; padding-top: var(--s-2); border-top: 1px solid var(--border); color: var(--text-muted); }
.empty-rating {
  margin-top: auto; padding-top: var(--s-2); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-1);
}
.cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.cta:hover { text-decoration: underline; }
.empty { color: var(--text-muted); padding: var(--s-6) var(--s-2); text-align: center; }

/* Stars: SVG, amber; half stars use the #star-half gradient in base.html */

.star-row { display: inline-flex; gap: 2px; vertical-align: middle; }
.star path { stroke: none; }
.star-full path { fill: var(--star); }
.star-empty path { fill: var(--star-empty); }
.half-on { stop-color: var(--star); }
.half-off { stop-color: var(--star-empty); }
.stars { display: inline-flex; line-height: 0; }

/* Logo tiles and avatars: deterministic hue per name ----------------------------- */

.hue-0 { --h: 172; } .hue-1 { --h: 198; } .hue-2 { --h: 222; } .hue-3 { --h: 256; }
.hue-4 { --h: 292; } .hue-5 { --h: 340; } .hue-6 { --h: 18; }  .hue-7 { --h: 38; }

.tile, .avatar {
  flex: none; display: inline-grid; place-items: center; overflow: hidden;
  background: hsl(var(--h, 172) var(--tile-bg-s) var(--tile-bg-l));
  color: hsl(var(--h, 172) var(--tile-fg-s) var(--tile-fg-l));
  font-weight: 700; letter-spacing: -0.02em; object-fit: cover;
}
.tile { width: 56px; height: 56px; border-radius: var(--radius); font-size: 1.25rem; }
img.tile { background: var(--surface-2); border: 1px solid var(--border); }
.tile-lg { width: 96px; height: 96px; border-radius: var(--radius-lg); font-size: 2rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; font-size: var(--fs-base); }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }

/* Company and user pages -------------------------------------------------------- */

.profile { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); margin-bottom: var(--s-4); }
.profile h1 { margin-bottom: var(--s-1); overflow-wrap: anywhere; }
.profile p { margin: 4px 0; }
.score { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: var(--s-1) 0; }
.score strong { font-size: var(--fs-xl); line-height: 1; letter-spacing: -0.03em; }
.about { margin-bottom: var(--s-4); }
.panel { padding: var(--s-3); margin-bottom: var(--s-4); }
.panel h2 { font-size: var(--fs-md); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-full); font-size: 0.8125rem; font-weight: 600; margin: 0;
}
.badge.pending { background: var(--warning-bg); color: var(--warning-text); }
.badge.verified { background: var(--success-bg); color: var(--success-text); }

.reviews { list-style: none; padding: 0; margin: 0; }
.review { display: flex; gap: var(--s-2); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.review:first-child { padding-top: 0; }
.review > div { flex: 1; min-width: 0; }
.review header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.review header a { font-weight: 600; }
.review header form { margin-left: auto; }
.review time { color: var(--text-muted); font-size: var(--fs-sm); }
.review p { margin: var(--s-1) 0 0; }

/* Star picker: radios rendered 5..1 and reversed with flexbox, so "this star
   and every star before it" is the label plus its following siblings. */

.star-picker { border: 0; padding: 0; margin: 0 0 var(--s-2); }
.star-picker legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.star-input { display: inline-flex; flex-direction: row-reverse; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.25rem; line-height: 1; cursor: pointer; color: var(--star-empty); padding: 0 2px; transition: color var(--ease); }
.star-input label::before { content: "★"; }
.star-input input:checked ~ label,
.star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Messages and pagination ------------------------------------------------------- */

.messages { list-style: none; padding: 0; margin: var(--s-3) 0 0; }
.message { padding: 12px var(--s-2); border-radius: var(--radius); margin-bottom: var(--s-1); background: var(--accent-soft); color: var(--accent-soft-text); font-weight: 500; }
.message.success { background: var(--success-bg); color: var(--success-text); }
.message.error, .message.warning { background: var(--warning-bg); color: var(--warning-text); }

.pagination { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-4) 0 0; justify-content: center; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  text-decoration: none; font-weight: 500;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pagination .gap { border: 0; background: none; }

/* Footer -------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--s-4); padding-block: var(--s-6) var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid p { margin: var(--s-1) 0 0; }
.footer-grid .tagline { color: var(--text); font-weight: 500; }
.footer-heading { font-size: var(--fs-sm); font-weight: 700; color: var(--text); margin: 0 0 12px; letter-spacing: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: var(--s-2); }
.footer-bottom p { margin: 0; }

/* Motion ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .company-card:hover { transform: none; }
}

@media (max-width: 480px) {
  .profile { flex-direction: column; align-items: flex-start; }
  .hero-inner { padding-block: var(--s-6) var(--s-4); }
  .search-bar .btn-lg { padding: 0 var(--s-2); }
  .hero-actions .btn { flex: 1 1 100%; }
}
