/*
Theme Name:  Trade Rates
Description: Multi-page UK trade day rate reference site.
Version:     2.0.0
*/

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  DESIGN TOKENS                                                       ║
   ║  Edit these to restyle the entire site in one place.                 ║
   ║  You can also override any of these via:                             ║
   ║  WP Admin → Settings → Trade Rates → Custom CSS                     ║
   ║                                                                      ║
   ║  Example prompt to Claude: "Change the accent to teal"              ║
   ║  Claude will update --color-accent below and nothing else.           ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

:root {

    /* ── COLOURS ──────────────────────────────────────────────────────── */
    --color-dark:       #0d1a2e;   /* Dark navy  — header bg, tile bg      */
    --color-dark-mid:   #2c3d55;   /* Mid navy   — secondary text           */
    --color-muted:      #5a6f88;   /* Slate      — labels, captions         */
    --color-accent:     #e07b2a;   /* Amber      — badges, highlights, CTAs */
    --color-accent-pale:#fdf0e4;   /* Light amber — tinted backgrounds      */
    --color-bg:         #f7f4f0;   /* Cream      — page background          */
    --color-white:      #ffffff;
    --color-border:     #dde3ea;   /* Subtle border                         */

    /* ── SHADOWS ──────────────────────────────────────────────────────── */
    --shadow-sm:  0 1px 3px rgba(13,26,46,.08), 0 1px 2px rgba(13,26,46,.04);
    --shadow-md:  0 4px 12px rgba(13,26,46,.10), 0 2px 4px rgba(13,26,46,.06);
    --shadow-lg:  0 16px 40px rgba(13,26,46,.14);

    /* ── TYPOGRAPHY ───────────────────────────────────────────────────── */
    --font-serif: 'DM Serif Display', Georgia, serif;   /* Headlines        */
    --font-sans:  'DM Sans', system-ui, sans-serif;     /* Body / UI        */

    /* ── LAYOUT ───────────────────────────────────────────────────────── */
    --radius:     14px;
    --max-w:      1200px;

    /* ── SPACING SCALE ────────────────────────────────────────────────── */
    --sp-xs:  8px;
    --sp-sm:  16px;
    --sp-md:  24px;
    --sp-lg:  40px;
    --sp-xl:  72px;
}


/* ══════════════════════════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════════════════════════════════
   ADSENSE ZONES
   Zones render when ad code is pasted into WP Admin → Trade Rates → AdSense
══════════════════════════════════════════════════════════════════════════ */
.tr-ad {
    width: 100%;
    overflow: hidden;
    text-align: center;
}
.tr-ad--header_banner  { padding: var(--sp-sm) 0; background: var(--color-bg); }
.tr-ad--content_top    { padding: var(--sp-md) 0; }
.tr-ad--content_bottom { padding: var(--sp-md) 0; }
.tr-ad--footer_banner  { padding: var(--sp-sm) 0; background: var(--color-bg); }


/* ══════════════════════════════════════════════════════════════════════════
   STICKY HEADER — navy background, seamless with hero
══════════════════════════════════════════════════════════════════════════ */
.tr-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--color-dark);
    border: none;
    box-shadow: none;
    outline: none;
}
.tr-header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--sp-md) 18px 0;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-sm);
}
.tr-logo {
    display: block;
    width: 260px;
    max-width: 55vw;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}
.tr-logo img,
.tr-logo svg {
    width: 100%;
    height: auto;
    display: block;
}
.tr-logo:hover { text-decoration: none; }

/* Hide old inline nav and pill — replaced by burger */
.tr-nav { display: none; }
.tr-updated-pill { display: none; }

/* ── Burger button ────────────────────────────────── */
.tr-burger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-shrink: 0;
    margin-left: auto;
}
.tr-burger span {
    display: block;
    width: 35px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
}
/* Animate to X when open */
.tr-burger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.tr-burger.open span:nth-child(2) { opacity: 0; }
.tr-burger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ── Dropdown nav ─────────────────────────────────── */
.tr-nav-dropdown {
    position: absolute;
    top: 120px;
    left: 0; right: 0;
    z-index: 190;
    background: rgba(13,26,46,.98);
    backdrop-filter: blur(12px);
    border-bottom: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.tr-nav-dropdown.open { max-height: 500px; }

.tr-nav-dropdown-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 24px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
}
.tr-nav-dropdown-inner a {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
/* Divider between trades and site pages in dropdown */
.tr-nav-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,.1);
    margin: 10px 0;
}

.tr-nav-dropdown-inner a.active {
    color: var(--color-accent);
    background: rgba(255,255,255,.06);
}


/* ══════════════════════════════════════════════════════════════════════════
   HERO — used on both hub and trade pages
══════════════════════════════════════════════════════════════════════════ */
.tr-hero {
    background: var(--color-dark);
    padding: 0 var(--sp-md) 0;
    overflow: hidden;
    position: relative;
}
/* No background texture */
.tr-hero::before { display: none; }
.tr-hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
}
.tr-hero-copy { max-width: 720px; margin-bottom: 40px; }

/* Eyebrow hidden — kept in markup for trade pages but not shown on hub */
.tr-eyebrow { display: none; }

.tr-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.1;
    color: #fff;
    letter-spacing: -.02em;
    margin-bottom: 22px;
    margin-top: 0;
}
.tr-hero h1 em { font-style: italic; color: var(--color-accent); }
/* Prevent first line of H1 wrapping mid-phrase */
.tr-h1-line { white-space: nowrap; }

.tr-hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,.9);
    max-width: 600px;
    line-height: 1.7;
}


/* ══════════════════════════════════════════════════════════════════════════
   SELECTOR BAR  (trade page only)
══════════════════════════════════════════════════════════════════════════ */
.tr-selector-bar {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--sp-sm);
    align-items: end;
    margin-bottom: 60px;
}
.tr-field label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: var(--sp-xs);
}
.tr-field select {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    font-size: .97rem;
    font-weight: 500;
    color: var(--color-dark);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235a6f88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
/* Force sans-serif on select options (Safari fix) */
.tr-field select option {
    font-family: -apple-system, 'DM Sans', system-ui, sans-serif;
}
.tr-field select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(224,123,42,.15);
}
.tr-selector-hint {
    font-size: .8rem;
    color: var(--color-muted);
    padding-bottom: 15px;
    white-space: nowrap;
}


/* ══════════════════════════════════════════════════════════════════════════
   HUB PAGE — trade grid
══════════════════════════════════════════════════════════════════════════ */
.tr-hub-selector {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: 60px;
}
.tr-hub-selector .tr-field { flex: 1; }

.tr-section-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--color-dark);
    margin-bottom: 6px;
}
.tr-section-sub {
    font-size: .92rem;
    color: var(--color-muted);
    margin-bottom: var(--sp-lg);
}

.tr-trade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--sp-sm);
    margin-bottom: var(--sp-xl);
}
.tr-trade-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--sp-md);
    text-decoration: none;
    color: var(--color-dark);
    transition: border-color .18s, box-shadow .18s, transform .18s;
    display: block;
}
.tr-trade-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--color-dark);
}
.tr-trade-card-name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: var(--sp-xs);
    line-height: 1.2;
}
.tr-trade-card-range {
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-muted);
    margin-bottom: 6px;
}
.tr-trade-card-typical {
    font-size: 1.4rem;
    font-family: var(--font-serif);
    color: var(--color-accent);
    line-height: 1;
}
.tr-trade-card-typical span {
    font-family: var(--font-sans);
    font-size: .72rem;
    color: var(--color-muted);
    font-weight: 500;
    margin-left: 4px;
}
.tr-trade-card-cta {
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-top: var(--sp-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ══════════════════════════════════════════════════════════════════════════
   MAIN WRAPPER
══════════════════════════════════════════════════════════════════════════ */
.tr-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--sp-lg) var(--sp-md) 80px;
}


/* ══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════════════════════ */
.tr-empty { text-align: center; padding: 60px var(--sp-md); }
.tr-empty h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--color-dark-mid);
    margin-bottom: 10px;
}
.tr-empty p { font-size: .92rem; color: var(--color-muted); max-width: 340px; margin: 0 auto; }


/* ══════════════════════════════════════════════════════════════════════════
   RESULT PANEL
══════════════════════════════════════════════════════════════════════════ */
.tr-result { display: none; animation: fadeUp .35s ease both; }
.tr-result.visible { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tr-result-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    margin-bottom: var(--sp-md);
    font-size: .85rem;
    font-weight: 500;
    color: var(--color-muted);
}
.tr-result-meta strong { color: var(--color-dark); font-weight: 700; }
.tr-result-meta .sep   { color: var(--color-border); }


/* ══════════════════════════════════════════════════════════════════════════
   ROW LABELS (Day / Hourly)
══════════════════════════════════════════════════════════════════════════ */
.tr-rates-row-label {
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 12px;
}
.tr-rates-row-label span { font-weight: 400; letter-spacing: 0; text-transform: none; opacity: .7; }
.tr-rates-row-label--secondary { margin-top: 32px; }


/* ══════════════════════════════════════════════════════════════════════════
   RATE TILES
══════════════════════════════════════════════════════════════════════════ */
.tr-rates-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: var(--sp-sm);
    margin-bottom: 20px;
}
.tr-tile {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: var(--sp-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 2px solid transparent;
}
.tr-tile-typical {
    background: var(--color-dark);
    position: relative;
}
.tr-tile-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 99px;
    white-space: nowrap;
}
.tr-tile-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 10px;
}
.tr-tile-typical .tr-tile-label { color: rgba(255,255,255,.45); }

.tr-tile-value {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    line-height: 1;
    color: var(--color-dark);
    letter-spacing: -.02em;
}
.tr-tile-typical .tr-tile-value { color: #fff; font-size: 3.2rem; }

.tr-tile-sub { font-size: .78rem; color: var(--color-muted); margin-top: 6px; }
.tr-tile-typical .tr-tile-sub { color: rgba(255,255,255,.4); }

/* Hourly row — identical to day rate row, typical uses same navy+orange badge */
.tr-tile--secondary { background: var(--color-white); border: 2px solid transparent; }
.tr-tile--secondary .tr-tile-value { font-size: 2.6rem; color: var(--color-dark); }
.tr-tile-typical-hr {
    background: var(--color-dark) !important;
    border-color: transparent !important;
}
.tr-tile-typical-hr .tr-tile-label { color: rgba(255,255,255,.45) !important; }
.tr-tile-typical-hr .tr-tile-value { color: #fff !important; font-size: 3.2rem !important; }
.tr-tile-typical-hr .tr-tile-sub   { color: rgba(255,255,255,.4) !important; }


/* ══════════════════════════════════════════════════════════════════════════
   REGIONAL POSITION BAR — hidden
══════════════════════════════════════════════════════════════════════════ */
.tr-compare-bar-card { display: none; }


/* ══════════════════════════════════════════════════════════════════════════
   COMPARE TOGGLE BUTTON
══════════════════════════════════════════════════════════════════════════ */
.tr-compare-toggle {
    font-family: var(--font-sans);
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-dark-mid);
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 11px 22px;
    cursor: pointer;
    transition: border-color .18s, color .18s;
    margin-bottom: var(--sp-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tr-compare-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.tr-compare-toggle .tr-toggle-arrow {
    display: inline-block;
    font-style: normal;
    color: var(--color-accent);
    font-size: 1rem;
    transition: transform .25s;
    line-height: 1;
}
.tr-compare-toggle.open .tr-toggle-arrow { transform: rotate(180deg); }


/* ══════════════════════════════════════════════════════════════════════════
   REGION COMPARISON TABLE
══════════════════════════════════════════════════════════════════════════ */
.tr-table-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: none;
    margin-bottom: 28px;
}
.tr-table-card.visible { display: block; }
.tr-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--color-border);
}
.tr-table-title { font-family: var(--font-serif); font-size: 1.1rem; }
.tr-table-inner { overflow-x: auto; }

table.tr-table { width: 100%; border-collapse: collapse; }
.tr-table thead th {
    padding: 12px 20px;
    background: var(--color-bg);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
}
.tr-table thead th:not(:first-child) { text-align: right; }
.tr-table tbody td {
    padding: 13px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: .88rem;
}
.tr-table tbody td:not(:first-child) { text-align: right; color: var(--color-dark-mid); }
.tr-table tbody td.td-typical { font-weight: 700; color: var(--color-dark); font-size: .95rem; }
.tr-table tbody tr:last-child td { border-bottom: none; }
.tr-table tbody tr.tr-row-selected td { background: var(--color-accent-pale); }
.tr-table tbody tr.tr-row-selected td:first-child { border-left: 3px solid var(--color-accent); padding-left: 17px; }
.tr-table tbody tr.tr-row-selected td.td-typical { color: var(--color-accent); }


/* ══════════════════════════════════════════════════════════════════════════
   DISCLAIMER BANNER
══════════════════════════════════════════════════════════════════════════ */
.tr-disclaimer {
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius);
    padding: 20px 28px;
    font-size: 1rem;
    color: #fff;
    line-height: 1.65;
    margin-bottom: var(--sp-sm);
}
.tr-disclaimer strong { color: #fff; font-weight: 800; }


/* ══════════════════════════════════════════════════════════════════════════
   INFO CARDS
══════════════════════════════════════════════════════════════════════════ */
.tr-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}
.tr-info-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.tr-info-card h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--color-dark);
    line-height: 1.25;
}
.tr-info-card p {
    font-size: .95rem;
    color: var(--color-dark-mid);
    line-height: 1.75;
}


/* ══════════════════════════════════════════════════════════════════════════
   FAQ SECTION
══════════════════════════════════════════════════════════════════════════ */
.tr-faq-section {
    margin-bottom: var(--sp-xl);
}
.tr-faq-section h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: var(--sp-lg);
    color: var(--color-dark);
}
.tr-faq-item {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--sp-xs);
    overflow: hidden;
}
.tr-faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-sm);
    padding: 20px 24px;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.tr-faq-q:hover { background: var(--color-bg); }
.tr-faq-q.open   { color: var(--color-accent); }
.tr-faq-icon {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform .25s, background .15s;
    color: var(--color-muted);
}
.tr-faq-q.open .tr-faq-icon {
    transform: rotate(45deg);
    background: var(--color-accent);
    color: #fff;
}
.tr-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .2s;
    font-size: .95rem;
    color: var(--color-dark-mid);
    line-height: 1.75;
}
.tr-faq-a.open {
    max-height: 400px;
    padding: 0 24px 20px;
}


/* ══════════════════════════════════════════════════════════════════════════
   RELATED TRADES
══════════════════════════════════════════════════════════════════════════ */
.tr-related {
    margin-bottom: var(--sp-xl);
}
.tr-related h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: var(--sp-md);
    color: var(--color-dark);
}
.tr-related-grid {
    display: flex;
    gap: var(--sp-sm);
    flex-wrap: wrap;
}
.tr-related-link {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 20px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-dark);
    text-decoration: none;
    transition: border-color .15s, color .15s;
}
.tr-related-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}


/* ══════════════════════════════════════════════════════════════════════════
   STANDARD PAGE (About, FAQ, Contact, Privacy etc)
══════════════════════════════════════════════════════════════════════════ */

/* ── Page title band ───────────────────────────────── */
.tr-page-band {
    background: var(--color-dark);
    padding: 40px var(--sp-md) 48px;
}
.tr-page-band-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.tr-breadcrumb {
    font-size: .8rem;
    color: rgba(255,255,255,.4);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tr-breadcrumb a {
    color: rgba(255,255,255,.4);
    text-decoration: none;
    transition: color .15s;
}
.tr-breadcrumb a:hover { color: var(--color-accent); }
.tr-breadcrumb-sep { opacity: .4; }
.tr-page-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    color: #fff;
    line-height: 1.15;
    letter-spacing: -.02em;
}

/* ── Page layout ───────────────────────────────────── */
.tr-page-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--sp-lg) var(--sp-md) 80px;
}
.tr-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

/* ── Content column ─────────────────────────────────── */
.tr-page-content {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 40px 48px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

/* WordPress block editor content styles */
.tr-page-content h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--color-dark);
    margin: 36px 0 14px;
    line-height: 1.2;
}
.tr-page-content h2:first-child { margin-top: 0; }

.tr-page-content h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--color-dark);
    margin: 28px 0 10px;
    line-height: 1.25;
}
.tr-page-content p {
    font-size: 1rem;
    color: var(--color-dark-mid);
    line-height: 1.8;
    margin-bottom: 18px;
}
.tr-page-content p:last-child { margin-bottom: 0; }

.tr-page-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.tr-page-content a:hover { opacity: .8; }

.tr-page-content ul,
.tr-page-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
    color: var(--color-dark-mid);
    font-size: 1rem;
    line-height: 1.8;
}
.tr-page-content li { margin-bottom: 6px; }

.tr-page-content blockquote {
    border-left: 4px solid var(--color-accent);
    background: var(--color-accent-pale);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--color-dark-mid);
}

.tr-page-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
}

.tr-page-content strong { color: var(--color-dark); font-weight: 700; }

/* WPForms / contact form styling */
.tr-page-content .wpforms-container input[type="text"],
.tr-page-content .wpforms-container input[type="email"],
.tr-page-content .wpforms-container textarea {
    font-family: var(--font-sans) !important;
    border: 2px solid var(--color-border) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: .95rem !important;
    width: 100% !important;
    transition: border-color .18s !important;
}
.tr-page-content .wpforms-container input:focus,
.tr-page-content .wpforms-container textarea:focus {
    border-color: var(--color-accent) !important;
    outline: none !important;
}
.tr-page-content .wpforms-container button[type="submit"],
.tr-page-content .wpforms-container input[type="submit"] {
    background: var(--color-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 13px 28px !important;
    font-family: var(--font-sans) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: opacity .18s !important;
}
.tr-page-content .wpforms-container button[type="submit"]:hover { opacity: .88 !important; }

/* ── Sidebar ────────────────────────────────────────── */
.tr-page-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    position: sticky;
    top: 140px;
}
.tr-sidebar-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.tr-sidebar-card-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-dark);
    margin-bottom: 10px;
}
.tr-sidebar-card p {
    font-size: .88rem;
    color: var(--color-muted);
    line-height: 1.65;
    margin-bottom: 16px;
}
.tr-sidebar-btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .15s;
}
.tr-sidebar-btn:hover { opacity: .88; text-decoration: none; }
.tr-sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tr-sidebar-links a {
    font-size: .88rem;
    color: var(--color-dark-mid);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
    display: block;
    transition: color .15s;
}
.tr-sidebar-links a:hover { color: var(--color-accent); }
.tr-sidebar-links li:last-child a { border-bottom: none; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .tr-page-layout {
        grid-template-columns: 1fr;
    }
    .tr-page-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .tr-sidebar-card { flex: 1; min-width: 240px; }
}
@media (max-width: 600px) {
    .tr-page-content { padding: 28px 24px; }
    .tr-page-sidebar  { flex-direction: column; }
}


/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════ */
.tr-footer {
    background: var(--color-dark);
    padding: 40px var(--sp-md);
}
.tr-footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.tr-footer-trades {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-bottom: 18px;
}
.tr-footer-trades a {
    font-size: .85rem;
    font-weight: 500;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}
.tr-footer-trades a:hover { color: var(--color-accent); }
.tr-footer-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-bottom: 0;
}
.tr-footer-pages a {
    font-size: .85rem;
    font-weight: 500;
    color: rgba(255,255,255,.45);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}
.tr-footer-pages a:hover { color: var(--color-accent); }
.tr-footer-meta {
    font-size: .75rem;
    color: rgba(255,255,255,.3);
    text-align: left;
}


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .tr-hub-selector { flex-direction: column; align-items: stretch; }
}

@media (max-width: 640px) {
    .tr-header-inner { padding-left: var(--sp-md); }

    .tr-selector-bar {
        grid-template-columns: 1fr;
        padding: 22px 20px;
    }
    .tr-selector-hint { display: none; }

    .tr-rates-row { grid-template-columns: 1fr 1fr; }
    .tr-tile-typical { grid-column: 1 / -1; order: -1; }
    .tr-tile-typical-hr { grid-column: 1 / -1; order: -1; }

    .tr-compare-bar-header { flex-direction: column; gap: 4px; }

    .tr-trade-grid { grid-template-columns: 1fr 1fr; }

    .tr-h1-line { white-space: normal; }

    /* FAQ heading — 30% smaller, tighter leading on mobile */
    .tr-faq-section h2 {
        font-size: 1.4rem;
        line-height: 1.25;
        margin-bottom: var(--sp-md);
    }
}

@media (max-width: 400px) {
    .tr-trade-grid { grid-template-columns: 1fr; }
    .tr-rates-row  { grid-template-columns: 1fr; }
    .tr-tile-typical { grid-column: 1; }
}
