/* RipOffs.co — main stylesheet
 * Vibe: investigative-newspaper meets technical document.
 * Fonts: Merriweather (serif headlines), IBM Plex Mono (metadata),
 *        Barlow Condensed (UI labels).
 */

:root {
    --ink:        #0d1b2a; /* deep navy, near-black */
    --ink-2:      #14263a;
    --paper:      #f5efe6; /* warm off-white */
    --paper-2:    #ebe3d4;
    --rule:       #2e4053; /* steel for hairlines */
    --rule-soft:  #c9bfa9;
    --gold:       #c89a2b; /* dimmer than the brainstorm's #d4af37, more newsprint */
    --gold-deep:  #8a6f1c;
    --burgundy:   #8a1f1f;
    --burgundy-2: #6b1414;
    --muted:      #5b6471;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Merriweather', Georgia, serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--burgundy);
    text-decoration: none;
    border-bottom: 1px solid rgba(138, 31, 31, 0.25);
}
a:hover { color: var(--burgundy-2); border-bottom-color: var(--burgundy-2); }

.mono {
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--muted);
    text-transform: uppercase;
}

.cond {
    font-family: 'Barlow Condensed', Impact, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---------- Masthead ---------- */
.masthead {
    background: var(--paper);
    border-bottom: 4px double var(--ink);
    padding: 18px 24px 10px;
    text-align: center;
}
.masthead .nameplate {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(38px, 6vw, 72px);
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
    margin: 0;
    padding: 0;
}
.masthead .nameplate .dot { color: var(--burgundy); }
.masthead .tagline {
    margin: 6px 0 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.masthead .nav {
    margin-top: 10px;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 14px;
}
.masthead .nav a {
    color: var(--ink);
    border: none;
    margin: 0 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}
.masthead .nav a:hover { border-bottom-color: var(--ink); }

/* ---------- Ticker ---------- */
.ticker {
    background: var(--ink);
    color: var(--paper-2);
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    overflow: hidden;
    white-space: nowrap;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    padding: 8px 0;
}
.ticker .label {
    background: var(--burgundy);
    color: var(--paper);
    padding: 4px 10px;
    margin-right: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.ticker .item { padding-right: 28px; }
.ticker .item .ts { color: var(--gold); margin-right: 8px; }
.ticker a {
    color: var(--paper-2);
    border: none;
}
.ticker a:hover { color: var(--gold); }

/* ---------- Layout ---------- */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 24px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 36px;
    align-items: start;
}
.wrap.single { grid-template-columns: minmax(0, 1fr); }

main h1, main h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 14px;
}
main h1 { font-size: 2rem; line-height: 1.15; }
main h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 6px;
    margin-top: 28px;
}

/* ---------- Trending grid ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0;
    border-top: 1px solid var(--ink);
    border-left: 1px solid var(--ink);
}
.report-card {
    background: var(--paper);
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}
.report-card .meta { margin-bottom: 6px; }
.report-card .cat {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    color: var(--burgundy);
    font-weight: 700;
}
.report-card h3 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.12rem;
    line-height: 1.25;
    margin: 4px 0 8px;
    color: var(--ink);
}
.report-card h3 a { color: var(--ink); border: none; }
.report-card h3 a:hover { text-decoration: underline; }
.report-card .biz {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.report-card p {
    font-size: 0.92rem;
    color: var(--ink-2);
    margin: 0 0 12px;
    flex: 1;
}
.report-card .footer {
    border-top: 1px dashed var(--rule-soft);
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.report-card .by { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: var(--muted); }

/* ---------- Right rail ---------- */
.rail { font-size: 0.95rem; }
.rail section { margin-bottom: 28px; }
.rail h2 {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 14px;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 4px;
    margin: 0 0 10px;
}
.rail ul { list-style: none; padding: 0; margin: 0; }
.rail ul li {
    padding: 4px 0;
    border-bottom: 1px dotted var(--rule-soft);
    font-size: 0.92rem;
}
.rail ul li:last-child { border-bottom: none; }
.rail ul li a { color: var(--ink); border: none; }
.rail ul li a:hover { color: var(--burgundy); }
.rail ul li .count {
    float: right;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
}

.search-box input[type=search] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ink);
    background: var(--paper);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.search-box button {
    width: 100%;
    padding: 9px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px;
    cursor: pointer;
}
.search-box button:hover { background: var(--burgundy); }

.cta {
    display: block;
    background: var(--burgundy);
    color: var(--paper) !important;
    padding: 16px 14px;
    text-align: center;
    border: 2px solid var(--burgundy-2);
    text-decoration: none;
    border-bottom: 2px solid var(--burgundy-2) !important;
}
.cta .top {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 0.1em;
    font-weight: 700;
}
.cta .sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
    display: block;
    margin-top: 4px;
}
.cta:hover { background: var(--burgundy-2); }

/* ---------- Single report page ---------- */
.report-detail header.hd {
    border-bottom: 1px solid var(--ink);
    padding-bottom: 14px;
    margin-bottom: 22px;
}
.report-detail .crumbs { font-size: 0.78rem; }
.report-detail h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    margin: 8px 0 6px;
}
.report-detail .byline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.report-detail .body p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 1em;
}
.report-detail .body p:first-of-type::first-letter {
    font-family: 'Merriweather', serif;
    font-size: 3.4em;
    float: left;
    line-height: 0.85;
    margin: 6px 8px 0 0;
    color: var(--burgundy);
}

.factbox {
    background: var(--paper-2);
    border: 1px solid var(--ink);
    padding: 14px 16px;
    margin: 18px 0 22px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
}
.factbox dt {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    float: left;
    width: 130px;
    padding: 3px 0;
}
.factbox dd { padding: 3px 0 3px 130px; margin: 0; }
.factbox dd a { color: var(--ink); border-color: var(--rule); }

.evidence {
    border: 1px solid var(--ink);
    border-collapse: collapse;
    width: 100%;
    margin-top: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.84rem;
}
.evidence th, .evidence td {
    border: 1px solid var(--rule);
    padding: 6px 10px;
    text-align: left;
}
.evidence thead { background: var(--ink); color: var(--paper); }
.evidence tbody tr:nth-child(even) { background: var(--paper-2); }

.disabled-block {
    background: var(--paper-2);
    border: 1px dashed var(--rule);
    padding: 14px 16px;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    gap: 16px;
}
.form-grid label {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 4px;
}
.form-grid .help {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 4px;
}
.form-grid input[type=text],
.form-grid input[type=email],
.form-grid input[type=tel],
.form-grid input[type=number],
.form-grid input[type=date],
.form-grid input[type=url],
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--ink);
    background: var(--paper);
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
}
.form-grid textarea { font-family: 'IBM Plex Mono', monospace; font-size: 0.88rem; min-height: 180px; resize: vertical; }
.form-grid .row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}
.form-grid input[type=submit],
button.submit {
    background: var(--ink);
    color: var(--paper);
    border: none;
    padding: 12px 22px;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 16px;
    cursor: pointer;
    justify-self: start;
}
.form-grid input[type=submit]:hover, button.submit:hover { background: var(--burgundy); }

.notice {
    border-left: 4px solid var(--burgundy);
    background: var(--paper-2);
    padding: 12px 16px;
    margin: 0 0 18px;
    font-size: 0.95rem;
}
.notice.ok { border-left-color: var(--gold-deep); }
.errors ul { margin: 6px 0 0 18px; padding: 0; }

/* ---------- Footer ---------- */
footer.site {
    background: var(--ink);
    color: var(--paper-2);
    padding: 28px 24px;
    margin-top: 60px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
}
footer.site .col { max-width: 760px; margin: 0 auto; }
footer.site h4 {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    margin: 0 0 8px;
    font-size: 13px;
}
footer.site a { color: var(--paper); border-bottom: 1px dotted var(--paper); }
footer.site .legal { color: #8d99a8; margin-top: 14px; font-size: 0.72rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .wrap {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 20px 16px 40px;
    }
    .form-grid .row { grid-template-columns: 1fr; }
    .factbox dt { float: none; width: auto; }
    .factbox dd { padding-left: 0; margin-bottom: 8px; }
}
