/*
Theme Name: Regiment Reports
Theme URI: https://www.creports.ca/
Description: A mobile-first field reporting theme for Regiment Reports.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Author: Regiment Reports
Text Domain: regiment-reports
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --rr-bg: #f4f5ef;
    --rr-surface: #fff;
    --rr-ink: #17231d;
    --rr-muted: #4d5a51;
    --rr-border: #d6ddd4;
    --rr-forest: #162c24;
    --rr-leaf: #23553d;
    --rr-lime: #deed9d;
    --rr-cream: #f8f9ef;
    --rr-radius: 16px;
    --rr-shell: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--rr-bg);
    color: var(--rr-ink);
    font: 400 1rem/1.6 "Segoe UI", system-ui, sans-serif;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--rr-leaf); text-underline-offset: .21em; }
button, input, select, textarea { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
:focus-visible { outline: 3px solid #276848; outline-offset: 4px; }
.rr-skip {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 100000;
    transform: translateY(-200%);
    padding: .75rem 1rem;
    background: white;
}
.rr-skip:focus { transform: none; }
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.screen-reader-text:focus {
    z-index: 10;
    width: auto;
    height: auto;
    padding: .75rem 1rem;
    background: white;
    clip-path: none;
}
.rr-shell { width: min(var(--rr-shell), calc(100% - 3.5rem)); margin-inline: auto; }

.rr-header { background: var(--rr-cream); border-bottom: 1px solid var(--rr-border); }
.rr-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding-block: .85rem;
}
.rr-brand-link {
    display: inline-flex;
    gap: .7rem;
    align-items: center;
    color: var(--rr-ink);
    font-size: 1.125rem;
    white-space: nowrap;
    text-decoration: none;
}
.rr-brand strong { font-weight: 750; }
.rr-brand-mark {
    display: grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 9px;
    background: var(--rr-forest);
    color: var(--rr-lime);
    font-size: 1.2rem;
    font-weight: 800;
}
.rr-brand .custom-logo { display: block; width: auto; max-width: 190px; max-height: 52px; object-fit: contain; }
.rr-nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.rr-nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .45rem .75rem;
    border-radius: 7px;
    color: var(--rr-ink);
    font-size: .875rem;
    font-weight: 650;
    text-decoration: none;
}
.rr-nav-list a:hover, .rr-nav-list a[aria-current="page"], .rr-nav-list .current-menu-item > a { background: #e5ebdd; }

.rr-hero {
    background-color: var(--rr-forest);
    background-image: radial-gradient(ellipse at 75% 125%, #36533c 0, transparent 70%);
    color: var(--rr-cream);
}
.rr-hero-inner { padding-block: clamp(2.1rem, 5.4vw, 4rem); }
.rr-hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 6.2vw, 5.15rem);
    line-height: 1.02;
    font-weight: 760;
    letter-spacing: -.073em;
    text-wrap: balance;
}
.rr-hero p { max-width: 38rem; margin: .85rem 0 0; color: #e0eadf; font-size: clamp(1rem, 2vw, 1.18rem); }
.rr-materials { display: grid; gap: .65rem; }
.rr-material {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .85rem;
    min-height: 72px;
    padding: .85rem .95rem .85rem 1rem;
    border: 1px solid var(--rr-border);
    border-inline-start: 5px solid var(--rr-material-colour);
    border-radius: 10px;
    background: var(--rr-surface);
    color: var(--rr-ink);
    text-decoration: none;
}
.rr-material:hover { background: #edf3e9; }
.rr-material--basf { --rr-material-colour: #8561a3; }
.rr-material--elastochem { --rr-material-colour: #b25937; }
.rr-material-name, .rr-material-detail { display: block; }
.rr-material-name { font-weight: 750; font-size: 1.1rem; line-height: 1.25; }
.rr-material-detail { margin-top: .22rem; color: var(--rr-muted); font-size: .875rem; line-height: 1.35; }
.rr-arrow { flex-shrink: 0; color: var(--rr-leaf); font-size: 1.25rem; }

.rr-safety { padding-block: clamp(1.15rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4.5rem); }
.rr-page-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 3.65rem);
    line-height: 1.09;
    font-weight: 750;
    letter-spacing: -.05em;
}
.rr-page-heading p { margin: .65rem 0 0; color: var(--rr-muted); }
.rr-roles { display: grid; gap: .9rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rr-role {
    padding: 1rem 1.1rem;
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius);
    background: var(--rr-surface);
}
.rr-role h2 { margin: .18rem 0 .55rem; font-size: 1.24rem; line-height: 1.3; letter-spacing: -.025em; }
.rr-role ul { margin: 0; padding: 0; list-style: none; }
.rr-role li { border-top: 1px solid var(--rr-border); }
.rr-role li a, .rr-role .rr-task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    min-height: 45px;
    padding-block: .42rem;
    font-size: .93rem;
}
.rr-role li a { font-weight: 650; }
.rr-role li a:hover { color: var(--rr-ink); }

.rr-page { padding-block: clamp(1.8rem, 5vw, 4.5rem); }
.rr-page-heading { margin-bottom: 1.45rem; overflow-wrap: anywhere; }
.rr-page-heading h2 { margin: 0; }
.rr-back { display: inline-block; margin-bottom: .7rem; font-weight: 650; }
.rr-entry + .rr-entry { margin-top: 2.5rem; }
.rr-content, .rr-comments {
    padding: clamp(1rem, 3.4vw, 2.3rem);
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius);
    background: var(--rr-surface);
    overflow-wrap: break-word;
}
.rr-content > :first-child { margin-top: 0; }
.rr-content > :last-child { margin-bottom: 0; }
.rr-content :is(h1, h2, h3, h4) { line-height: 1.25; letter-spacing: -.025em; }
.rr-content h1 { font-size: clamp(1.4rem, 3vw, 2.12rem); }
.rr-content :is(ol, ul) { padding-inline-start: 1.55em; }
.rr-content li + li { margin-top: .45em; }
.rr-content iframe { max-width: 100%; }
.rr-report-hub .rr-materials { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rr-report-hub .rr-material { padding: 1.2rem; }
.rr-entry--report .rr-content { overflow-x: auto; }
.rr-comments { margin-top: 1.25rem; }
.rr-content :where(input, textarea, select):not([type="hidden"], [type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="range"], [type="color"]) {
    max-width: 100%;
    min-height: 44px;
    padding: .5rem .65rem;
    border: 1px solid #939e94;
    border-radius: 6px;
    background: white;
    color: var(--rr-ink);
    font-size: 1rem;
}
.rr-content textarea { min-height: 92px; }
.rr-content :where(button, input[type="submit"]):not(:disabled) {
    min-height: 44px;
    padding: .5rem .85rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--rr-leaf);
    color: white;
    font-weight: 650;
}
.rr-content :where(button, input[type="submit"]):not(:disabled):hover { background: var(--rr-forest); }

.rr-footer { border-top: 1px solid var(--rr-border); background: #e9ede4; }
.rr-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .65rem 1.5rem;
    padding-block: 1.25rem;
    font-size: .9rem;
}
.rr-footer a { font-weight: 650; }

@media (max-width: 850px) {
    .rr-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .rr-shell { width: calc(100% - 2rem); }
    .rr-header-inner { align-items: flex-start; flex-direction: column; gap: .35rem; padding-block: .65rem; }
    .rr-nav-list { column-gap: 0; }
    .rr-nav-list a { padding-inline: .5rem; }
    .rr-roles, .rr-report-hub .rr-materials { grid-template-columns: minmax(0, 1fr); }
    .rr-role { padding-block: .85rem; }
}
@media (max-width: 375px) {
    .rr-footer-inner { flex-wrap: wrap; }
}
