/* ===========================================================================
   TradesMen Review — public site stylesheet.
   Light blue/white, Apple-style. Light theme only. Namespaced .tmr-*.
   =========================================================================== */
:root {
    color-scheme: light;
    --tmr-blue: #0066ff;
    --tmr-blue-dark: #0052cc;
    --tmr-blue-soft: #eef3fb;
    --tmr-ink: #0a2540;
    --tmr-muted: #5b6b82;
    --tmr-bg: #f5f8fc;
    --tmr-card: #ffffff;
    --tmr-border: #e2e8f0;
    --tmr-green: #1aa260;
    --tmr-amber: #f5a623;
    --tmr-red: #e0245e;
    --tmr-radius: 14px;
    --tmr-shadow: 0 1px 2px rgba(10,37,64,.04), 0 8px 24px rgba(10,37,64,.06);
    --tmr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: var(--tmr-bg); color: var(--tmr-ink);
    font-family: var(--tmr-font); font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--tmr-blue); text-decoration: none; }
a:hover { color: var(--tmr-blue-dark); text-decoration: underline; }
img { max-width: 100%; }

.tmr-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.tmr-narrow { max-width: 740px; margin: 0 auto; padding: 0 20px; }
.tmr-muted { color: var(--tmr-muted); }
.tmr-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--tmr-blue); }
.tmr-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.tmr-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--tmr-border);
}
.tmr-header__bar { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.tmr-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--tmr-ink); }
.tmr-brand:hover { text-decoration: none; }
.tmr-brand__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tmr-blue); }
.tmr-nav { display: flex; align-items: center; gap: 20px; }
.tmr-nav a { color: var(--tmr-ink); font-weight: 500; font-size: 15px; }
.tmr-nav a:hover { color: var(--tmr-blue); text-decoration: none; }

/* Buttons */
.tmr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--tmr-blue); color: #fff; border: none; border-radius: 980px;
    padding: 11px 22px; font-size: 15px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: background .15s ease, transform .05s ease;
}
.tmr-btn:hover { background: var(--tmr-blue-dark); color: #fff; text-decoration: none; }
.tmr-btn:active { transform: translateY(1px); }
.tmr-btn--secondary { background: var(--tmr-blue-soft); color: var(--tmr-blue); }
.tmr-btn--secondary:hover { background: #e2ebf8; color: var(--tmr-blue-dark); }
.tmr-btn--ghost { background: transparent; color: var(--tmr-ink); border: 1px solid var(--tmr-border); }
.tmr-btn--ghost:hover { background: #fff; color: var(--tmr-blue); }
.tmr-btn--sm { padding: 7px 14px; font-size: 13px; }
.tmr-btn--block { width: 100%; }

/* Cards + grid */
.tmr-card {
    background: var(--tmr-card); border: 1px solid var(--tmr-border);
    border-radius: var(--tmr-radius); box-shadow: var(--tmr-shadow); padding: 22px;
}
.tmr-card + .tmr-card { margin-top: 16px; }
.tmr-grid { display: grid; gap: 16px; }
.tmr-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tmr-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tmr-grid--4 { grid-template-columns: repeat(4, 1fr); }
.tmr-page { padding: 32px 0 64px; }
.tmr-page__title { font-size: 30px; letter-spacing: -.01em; margin: 0 0 6px; }

/* Hero */
.tmr-hero { padding: 80px 0 48px; text-align: center; }
.tmr-hero h1 { font-size: 50px; line-height: 1.07; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 700; }
.tmr-hero__lead { font-size: 20px; color: var(--tmr-muted); max-width: 660px; margin: 0 auto 26px; }
.tmr-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Search */
.tmr-search { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; max-width: 760px; margin: 22px auto 0; }
.tmr-search--page { max-width: none; margin: 0; }
.tmr-input, .tmr-select, .tmr-textarea {
    width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
    border: 1px solid var(--tmr-border); border-radius: 12px; background: #fff; color: var(--tmr-ink);
}
.tmr-input:focus, .tmr-select:focus, .tmr-textarea:focus {
    outline: none; border-color: var(--tmr-blue); box-shadow: 0 0 0 3px rgba(0,102,255,.15);
}
.tmr-field { margin-bottom: 16px; }
.tmr-label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.tmr-hint { font-size: 12px; color: var(--tmr-muted); }

/* Stat tiles */
.tmr-stat { text-align: center; }
.tmr-stat__n { font-size: 34px; font-weight: 700; color: var(--tmr-blue); }
.tmr-stat__l { color: var(--tmr-muted); font-size: 14px; }

/* Stars */
.tmr-stars { color: var(--tmr-amber); letter-spacing: 1px; font-size: 16px; white-space: nowrap; }
.tmr-stars .off { color: #d6deea; }
.tmr-rating-big { font-size: 44px; font-weight: 700; line-height: 1; }

/* Badges + chips */
.tmr-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 980px; }
.tmr-badge--verified { background: #e6f4ec; color: var(--tmr-green); }
.tmr-badge--pro { background: #e7f0ff; color: var(--tmr-blue-dark); }
.tmr-badge--pending { background: #fdf3e0; color: #9a6a00; }
.tmr-badge--rejected { background: #fce6ee; color: var(--tmr-red); }
.tmr-chip { display: inline-block; background: var(--tmr-blue-soft); color: var(--tmr-blue-dark); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; margin: 0 6px 6px 0; }
.tmr-chip a { color: inherit; }

/* Avatar / profile */
.tmr-avatar { width: 72px; height: 72px; border-radius: 50%; background: #dde7f5; object-fit: cover; flex: none; display: grid; place-items: center; color: var(--tmr-blue); font-weight: 700; font-size: 24px; }
.tmr-avatar--lg { width: 96px; height: 96px; font-size: 32px; }
.tmr-profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.tmr-cover { height: 140px; border-radius: var(--tmr-radius) var(--tmr-radius) 0 0; background: linear-gradient(120deg, #0066ff, #5aa0ff); }

/* Profile cards (search) */
.tmr-profile-card { display: flex; flex-direction: column; gap: 12px; color: inherit; height: 100%; }
.tmr-profile-card:hover { text-decoration: none; }
.tmr-profile-card__top { display: flex; gap: 14px; align-items: center; }
.tmr-profile-card__name { font-weight: 700; font-size: 17px; }
.tmr-profile-card__meta { color: var(--tmr-muted); font-size: 13px; }
.tmr-profile-card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Reviews */
.tmr-review { padding: 18px 0; border-top: 1px solid var(--tmr-border); }
.tmr-review:first-child { border-top: none; }
.tmr-review__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.tmr-review__author { font-size: 13px; color: var(--tmr-muted); }
.tmr-review__reply { margin-top: 12px; padding: 12px 14px; background: var(--tmr-blue-soft); border-radius: 12px; border-left: 3px solid var(--tmr-blue); }
.tmr-review__photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tmr-review__photos img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--tmr-border); }

/* Rating distribution bar */
.tmr-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tmr-bar__track { flex: 1; height: 8px; background: var(--tmr-blue-soft); border-radius: 6px; overflow: hidden; }
.tmr-bar__fill { display: block; height: 100%; background: var(--tmr-amber); }
.tmr-bar__n { width: 30px; text-align: right; color: var(--tmr-muted); font-size: 13px; }

/* Category averages */
.tmr-cat { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--tmr-border); font-size: 14px; }
.tmr-cat:last-child { border-bottom: none; }

/* Accessible star-rating input (radios) */
.tmr-starfield { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.tmr-starfield input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tmr-starfield label { font-size: 32px; color: #d6deea; cursor: pointer; line-height: 1; transition: color .1s ease; }
.tmr-starfield label:hover, .tmr-starfield label:hover ~ label,
.tmr-starfield input:checked ~ label { color: var(--tmr-amber); }
.tmr-starfield input:focus-visible + label { outline: 2px solid var(--tmr-blue); outline-offset: 2px; border-radius: 4px; }

/* Flash */
.tmr-flash { border-radius: 12px; padding: 13px 16px; margin: 16px 0; font-size: 14px; font-weight: 500; }
.tmr-flash--success { background: #e6f4ec; color: #0f7a45; }
.tmr-flash--error { background: #fce6ee; color: #b3173f; }
.tmr-flash--info { background: var(--tmr-blue-soft); color: var(--tmr-blue-dark); }

/* Trust list */
.tmr-trust { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.tmr-trust__item { display: flex; gap: 12px; align-items: flex-start; }
.tmr-trust__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--tmr-blue-soft); color: var(--tmr-blue); display: grid; place-items: center; font-weight: 700; flex: none; }

/* Filters bar */
.tmr-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tmr-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }

/* Pagination */
.tmr-pager { display: flex; justify-content: space-between; margin-top: 18px; }

/* Footer */
.tmr-footer { border-top: 1px solid var(--tmr-border); background: #fff; padding: 32px 0; margin-top: 48px; color: var(--tmr-muted); font-size: 14px; }
.tmr-footer__cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* Responsive */
@media (max-width: 900px) {
    .tmr-grid--3, .tmr-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .tmr-filters { grid-template-columns: repeat(2, 1fr); }
    .tmr-hero h1 { font-size: 38px; }
    .tmr-search { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .tmr-grid--2, .tmr-grid--3, .tmr-grid--4, .tmr-trust, .tmr-filters { grid-template-columns: 1fr; }
    .tmr-nav { gap: 12px; }
    .tmr-nav a.tmr-hide-sm { display: none; }
}
