/*************************
**  Our Tasmania Website
**  legal styles sheet
**  Build V. 0.2
**  Build Notes: Rebuild to dark page style from light slightly more modernised design and layout
**
**********************/
/* ═══════════════════════════════════════════════════
   PAGE LAYOUT — content + sticky TOC sidebar
═══════════════════════════════════════════════════ */
.policy-layout { display: grid; grid-template-columns: 1fr 260px; gap: 3rem; align-items: start; }
@media (max-width: 991px) { .policy-layout { grid-template-columns: 1fr; } }
aside {
    align-self: stretch;   /* fill the full grid row height */
    min-height: 0;
}
body {
    overflow-x: clip;      /* clip doesn't create a scroll container like hidden does */
}
/* ── Table of contents sidebar ── */
.toc-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    position: sticky; top: 84px;
    /* visible, not hidden: overflow:hidden here created a scroll container
       that broke position:sticky. */
    overflow: visible;
}
.toc-box::before {
    content: ''; display: block; height: 2px;
    background: linear-gradient(90deg, var(--emerald), transparent);
    margin-left: 10px;
}
.toc-box__header {
    padding: 1rem 1.4rem .75rem;
    border-bottom: 1px solid var(--rule);
    display: flex; align-items: center; gap: .65rem;
}
.toc-box__header i { color: var(--emerald); font-size: .82rem; }
.toc-box__header-label {
    font-family: var(--font-mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink-4);
}
.toc-progress {
    position: absolute; top: 43px; left: 0;
    height: 2px; width: 0%;
    background: linear-gradient(90deg, var(--emerald), var(--emerald-lt));
    transition: width .15s linear;
}
.toc-list { list-style: none; padding: .65rem .65rem .75rem; margin: 0; display: flex; flex-direction: column; gap: .15rem; }
.toc-item a {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .85rem; border-radius: var(--radius);
    font-size: .78rem; color: var(--ink-2); text-decoration: none;
    transition: background .18s, color .18s, border-color .18s;
    line-height: 1.35;
}
.toc-item a i { font-size: .65rem; color: var(--ink-4); flex-shrink: 0; transition: color .18s; }
.toc-item a:hover { background: var(--emerald-dim); color: var(--emerald-lt); }
.toc-item a:hover i { color: var(--emerald); }
.toc-item a.active { background: var(--emerald-dim); color: var(--emerald); }
.toc-item a.active i { color: var(--emerald); }
.toc-item a .toc-num {
    font-family: var(--font-mono); font-size: .58rem; color: var(--ink-4);
    flex-shrink: 0; width: 20px; text-align: right; transition: color .18s;
}
.toc-item a:hover .toc-num { color: var(--emerald); }
.toc-item a.active .toc-num { color: var(--emerald); }
/* Effective date chip at bottom of TOC */
.toc-meta {
    padding: .85rem 1.4rem; border-top: 1px solid var(--rule);
    display: flex; flex-direction: column; gap: .25rem;
}
.toc-meta__label { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); }
.toc-meta__val { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3); }
/* Read progress bar inside TOC header */

/* ═══════════════════════════════════════════════════
    POLICY CONTENT
═══════════════════════════════════════════════════ */

/* Section wrapper — scroll-target */
.policy-section { margin-bottom: 2.5rem; }

/* Section card */
.policy-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .3s, transform .25s, box-shadow .3s;
    position: relative;
}
.policy-card:hover {
    border-color: var(--emerald-rule);
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 0 1px var(--emerald-rule);
}
.policy-card::before {
    content: ''; display: block; height: 2px;
    background: linear-gradient(90deg, var(--emerald), rgba(90,158,58,0));
    opacity: 0; transition: opacity .3s;
}
.policy-card:hover::before { opacity: 1; }
.policy-card::after {
    content: ''; position: absolute; inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at 0% 0%, rgba(90,158,58,.06) 0%, transparent 60%);
    opacity: 0; transition: opacity .4s; pointer-events: none;
}
.policy-card:hover::after { opacity: 1; }


/* Card header */
.policy-card__head {
    padding: 1.35rem 1.75rem 1.2rem;
    border-bottom: 1px solid var(--rule);
    display: flex; align-items: center; gap: 1rem;
    background: var(--bg-2); position: relative;
}
.policy-card__head::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--emerald);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0); transform-origin: bottom;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.policy-card:hover .policy-card__head::before,
.policy-card:focus-within .policy-card__head::before { transform: scaleY(1); }

.policy-card__icon {
    width: 42px; height: 42px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--emerald-dim);
    border-radius: var(--radius);
    color: var(--emerald); font-size: .95rem;
    transition: background .25s, box-shadow .25s;
}
.policy-card:hover .policy-card__icon {
    background: rgba(90,158,58,.18);
    box-shadow: 0 0 12px rgba(90,158,58,.25);
}
.policy-card__title {
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
    color: var(--ink); line-height: 1.2; margin: 0;
}
.policy-card__body { padding: 1.75rem 2rem; }
.policy-card__body p {
    font-size: .875rem; color: var(--ink); line-height: 1.9; margin-bottom: 1.1rem;
}
.policy-card__body p:last-child { margin-bottom: 0; }
.policy-card__body a { color: var(--emerald); text-decoration: none; transition: color .15s; }
.policy-card__body a:hover { color: var(--emerald-lt); text-decoration: underline; }
.policy-card__body strong { color: var(--ink-2); font-weight: 600; }

/* ── Policy lists ── */
.policy-list {
    list-style: none; margin: .85rem 0 0; padding: 0;
    display: flex; flex-direction: column; gap: .4rem;
}
.policy-list li {
    display: flex; align-items: flex-start; gap: .75rem;
    font-size: .86rem; color: var(--ink); line-height: 1.7;
    padding: .55rem .85rem; background: rgba(255,255,255,.02);
    border: 1px solid transparent; border-radius: var(--radius);
    transition: background .2s, border-color .2s;
}
.policy-list li:hover { background: var(--emerald-dim); border-color: var(--emerald-rule); }
.policy-list li::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--emerald); flex-shrink: 0; margin-top: .6rem;
}
/* Nested sub-list (third parties) */
.policy-sublist {
    list-style: none; margin: .5rem 0 .35rem 1.25rem; padding: 0;
    display: flex; flex-direction: column; gap: .3rem;
}
.policy-sublist li {
    display: flex; align-items: flex-start; gap: .6rem;
    font-size: .82rem; color: var(--ink-2); line-height: 1.65;
    padding: .4rem .75rem; background: transparent; border: none; border-radius: 0;
}
.policy-sublist li::before {
    content: ''; width: 4px; height: 4px; border-radius: 50%;
    background: var(--ink-4); flex-shrink: 0; margin-top: .55rem;
}
.policy-card__num {
    font-family: var(--font-mono);
    font-size: .6rem; letter-spacing: .18em;
    color: var(--emerald);
    background: var(--emerald-dim);
    padding: .2rem .55rem; border-radius: 100px;
    margin-left: auto; flex-shrink: 0;
}
/* Third party service block */
.tp-service {
    background: var(--bg-2);
    border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: .75rem;
}
.tp-service:last-child { margin-bottom: 0; }
.tp-service__name {
    font-family: var(--font-display); font-size: .88rem; font-weight: 700;
    color: var(--ink); margin-bottom: .5rem; display: flex; align-items: center; gap: .6rem;
}
.tp-service__name i { color: var(--emerald); font-size: .8rem; }

/* ── Contact call-out ── */

.contact-cta {
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    background: var(--emerald-dim);
    border-radius: var(--radius-lg); padding: 1.5rem 1.75rem;
    margin-top: 1.25rem; position: relative; overflow: hidden;
}
.contact-cta::before {
    content: ''; position: absolute; right: -40px; top: -40px;
    width: 140px; height: 140px; border-radius: 50%;
    border: 1px solid var(--emerald-rule); opacity: .4; pointer-events: none;
}
.contact-cta::after {
    content: ''; position: absolute; right: 30px; top: -70px;
    width: 200px; height: 200px; border-radius: 50%;
    border: 1px solid var(--emerald-rule); opacity: .2; pointer-events: none;
}
.contact-cta__icon {
    width: 46px; height: 46px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--emerald); border-radius: var(--radius);
    color: #0e100f; font-size: 1rem;
}
.contact-cta__text { flex: 1; min-width: 0; }
.contact-cta__text strong { color: var(--ink); display: block; font-size: .9rem; margin-bottom: .15rem; font-weight: 700; }
.contact-cta__text span { font-size: .82rem; color: var(--ink-3); font-weight: 300; }
.contact-cta__btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--emerald); color: #0e100f !important;
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
    padding: .65rem 1.25rem; border-radius: var(--radius); text-decoration: none;
    font-weight: 600; transition: background .2s, transform .15s !important;
    white-space: nowrap;
}
.contact-cta__btn:hover { background: var(--emerald-lt) !important; transform: translateY(-1px) !important; }

/* ── OAIC notice box ── */
.oaic-box {
    display: flex; gap: 1rem; align-items: flex-start;
    background: var(--teal-dim);
    border-left: 3px solid var(--teal);
    border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.oaic-box i { color: var(--teal); font-size: .9rem; margin-top: .15rem; flex-shrink: 0; }
.oaic-box p { font-size: .82rem; color: var(--ink); line-height: 1.8; margin: 0; }
.oaic-box p a { color: var(--teal); text-decoration: none; }
.oaic-box p a:hover { color: #8ed4e4; text-decoration: underline; }

/* ═══════════════════════════════════════════════════
    RESPONSIVE
═══════════════════════════════════════════════════ */

@media (max-width: 991px) {
    .toc-box { position: static; }
    aside { align-self: auto; }
    .policy-layout { display: flex; flex-direction: column-reverse; gap: 2rem; }
}
@media (max-width: 767px) {
    .ot-hero__title { font-size: 2.8rem; }
    .policy-card__body { padding: 1.25rem 1.25rem; }
    .policy-card__head { padding: 1.1rem 1.25rem; }
    .contact-cta { flex-direction: column; align-items: flex-start; }
}
 /* ── Notice box (teal tint for jurisdiction/info callouts) ── */
.notice-box {
    display: flex; gap: 1.25rem; align-items: center;
    background: rgba(200,60,60,.05);
    border-left: 3px solid #c83c3c;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.notice-box i { color: #c83c3c; font-size: 1.95rem; flex-shrink: 0; }
.notice-box p {
    font-size: .845rem; color: var(--ink-2);
    line-height: 1.8; margin: 0; font-weight: 300;
}
.notice-box p strong { color: #d95050; }
.notice-box p a {
    color: #d95050; text-decoration: none;
    border-bottom: 1px solid rgba(200,60,60,.3);
}
.notice-box p a:hover { color: #e87070; border-color: #c83c3c; }
.help-intro p {
    max-width: 1222px;
}
.help-card__body p:last-of-type { margin-bottom: 0; }
.help-card__body a { color: var(--ot-accent-hi); }
.help-card__body a:hover { color: var(--ot-text); }

/* Lists inside cards */
.help-card__body ul {
    font-size: 0.84rem;
    color: var(--ot-text-muted);
    line-height: 1.9;
    margin-bottom: 0.75rem;
}
.help-card__body ul li { color: var(--ot-text-muted); }
.help-card__body ul li strong { color: var(--ot-text); }

/* Light theme: policy and notice surfaces use the shared ivory field-guide treatment. */
html[data-theme="light"] .ot-hero__sub {
    color: var(--ink-2);
}

html[data-theme="light"] .contact-cta,
html[data-theme="light"] .notice-box,
html[data-theme="light"] .oaic-box,
html[data-theme="light"] .toc-box,
html[data-theme="light"] .tp-service {
    background: var(--bg-card);

    color: var(--ink);
    box-shadow: 0 8px 24px rgba(55,45,28,.06);
}

html[data-theme="light"] .contact-cta__text,
html[data-theme="light"] .toc-meta__val {
    color: var(--ink-2);
}
