/*
Theme Name: TITMW
Description: The TITMW wheel. Spin it, read where it stops. Thirteen political systems and The Four Corners of the Circle.
Author: CL!CK
Version: 1.6.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: titmw
*/

:root{--titmw-pink:#FF1493;--titmw-ink:#000;--titmw-navy:#1f364a}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--titmw-ink);background:#fff;line-height:1.55}
body.titmw-home{background:#F8F4EA;--titmw-home-ink:#000} /* colour set in Appearance -> Customize -> TITMW */
a{color:inherit}
.titmw-site-header{padding:14px 20px}
.titmw-site-header a{font-weight:900;letter-spacing:.08em;text-decoration:none;font-size:20px}
.titmw-main{max-width:760px;margin:0 auto;padding:10px 20px 40px}
.titmw-main h1.titmw-title{font-size:clamp(30px,5vw,46px);line-height:1.15;margin:.4em 0 .6em}
/* The page fills at least the window, so the footer always sits at the bottom. */
body{min-height:100vh;display:flex;flex-direction:column}
body>main,body>#titmw-landing{flex:1 0 auto;width:100%}
.titmw-footer{margin-top:auto;text-align:right;padding:20px 24px 18px}
/* Copyright line, as on the DOT CLICK LTD sites */
.click-copy{margin:0;font-size:13px;font-weight:600;color:#6b6b6b}
body.titmw-home .click-copy{color:var(--titmw-home-ink)}
.click-word{display:inline-block;height:.95em;width:auto;aspect-ratio:1494.5/489.5;vertical-align:-0.2em;text-decoration:none}
.click-word svg{display:block;height:100%;width:auto;fill:currentColor}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Wheel (home page) ---------- */
#titmw-landing{text-align:center;max-width:900px;margin:0 auto;padding:22px 10px}
#titmw-landing h1{font-size:clamp(32px,5vw,54px);margin:0 0 5px;font-weight:800;letter-spacing:.08em;color:var(--titmw-home-ink)}
#titmw-landing .tw-instruction{margin:4px 0 16px;color:var(--titmw-home-ink)}
#titmw-landing .tw-stage{position:relative;width:min(100%,680px);margin:0 auto;aspect-ratio:1}
#titmw-landing svg{width:100%;height:100%;display:block;overflow:visible}
/* transform-origin must stay 0 0: the script rotates with rotate(angle 300 300), which already sets the centre. */
#titmw-landing .tw-wheel{transform-origin:0 0;cursor:pointer;outline:none}
#titmw-landing .tw-wheel:focus-visible .tw-rim{stroke:#20a45c;stroke-width:6}
#titmw-landing .tw-rim{fill:none;stroke:var(--titmw-navy);stroke-width:4;pointer-events:none}
#titmw-landing .tw-slice{stroke:#fff;stroke-width:2}
#titmw-landing .tw-slice.tw-winner{fill:#1ed34b;cursor:pointer;animation:tw-flash .5s step-end infinite}
/* After a spin, the other segments fade back so the green winner stands out. */
#titmw-landing .tw-slice{transition:opacity .4s}
#titmw-landing .tw-wheel.tw-done .tw-slice:not(.tw-winner){opacity:.5}
@keyframes tw-flash{50%{fill:#b8ff5a}}
#titmw-landing .tw-label{fill:#14202e;font-weight:700;font-size:16px;pointer-events:none}
#titmw-landing .tw-hub{cursor:pointer;outline:none}
#titmw-landing .tw-hub circle{fill:#fff;stroke:var(--titmw-navy);stroke-width:5}
#titmw-landing .tw-hub text{fill:#1d3448;font-size:27px;font-weight:900;pointer-events:none}
#titmw-landing .tw-hub:hover circle,#titmw-landing .tw-hub:focus-visible circle{stroke:#20a45c;stroke-width:8}
#titmw-landing .tw-pointer{fill:#17a34a;stroke:#fff;stroke-width:3;pointer-events:none}
#titmw-landing .tw-result{min-height:1.7em;font-size:20px;font-weight:700;margin:10px 0 4px;color:var(--titmw-home-ink)}
#titmw-landing .tw-result a{color:var(--titmw-home-ink)}
#titmw-landing .tw-again{font:inherit;font-size:14px;padding:6px 16px;border-radius:20px;border:2px solid #000;background:#fff;color:#000;cursor:pointer}
#titmw-landing .tw-again[hidden]{display:none}
@media (prefers-reduced-motion:reduce){#titmw-landing .tw-slice.tw-winner{animation:none}}

/* ---------- Links on the 13 pages ---------- */
.titmw-nav{margin:2.5em 0 1em;padding-top:1.2em;border-top:2px solid var(--titmw-navy)}
.titmw-nav h2{font-size:1.2em;margin:0 0 .6em}
.titmw-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.titmw-nav a,.titmw-back a{display:inline-block;padding:6px 14px;border-radius:20px;background:#28435d;color:#fff;text-decoration:none;font-weight:600}
.titmw-nav a:hover,.titmw-nav a:focus{background:#1ed34b;color:#0b2a14}
.titmw-back{margin-top:1em}
.titmw-back a{background:#fff;color:var(--titmw-navy);border:2px solid var(--titmw-navy);margin:0 4px 6px 0}

/* ---------- Formal style: The Four Corners of the Circle and its four corner pages ---------- */
body.titmw-formal{--f-ink:#14181f;--f-navy:#13233a;--f-navy2:#1c3150;--f-gold:#a8873a;--f-rule:#d5d8dd;--f-paper:#f4f3ef;
	background:var(--f-paper);color:var(--f-ink);font-size:17px}
.titmw-formal-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--f-navy);padding:16px 28px}
.titmw-formal-bar a{color:#fff;text-decoration:none}
.titmw-formal-brand{font-weight:800;letter-spacing:.22em;font-size:15px}
.titmw-formal-section{font-family:Georgia,"Times New Roman",serif;font-size:15px;color:#d9dee6!important}
.titmw-formal-main{max-width:980px;margin:0 auto;padding:44px 24px 30px}
.titmw-eyebrow,.titmw-crumb{font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:#5b6472;margin:0 0 10px}
.titmw-crumb a{color:var(--f-navy);text-decoration:none;border-bottom:1px solid var(--f-rule)}
.titmw-formal-title{font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:clamp(32px,4.6vw,50px);line-height:1.1;margin:0;color:var(--f-navy)}
.titmw-gold-rule{width:64px;height:3px;background:var(--f-gold);margin:18px 0 22px}
.titmw-formal-intro{max-width:44em;margin-bottom:28px}

/* The four panels */
.titmw-quad{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:2px;background:var(--f-paper);aspect-ratio:1;max-width:760px;margin:10px auto 0}
.titmw-q{position:relative;display:flex;flex-direction:column;gap:4px;padding:clamp(16px,3.5vw,34px);background:var(--f-navy);color:#fff;text-decoration:none;transition:background .2s}
a.titmw-q:hover,a.titmw-q:focus-visible{background:var(--f-navy2);outline:none}
.titmw-q-tl{justify-content:flex-start;align-items:flex-start;text-align:left}
.titmw-q-tr{justify-content:flex-start;align-items:flex-end;text-align:right}
.titmw-q-bl{justify-content:flex-end;align-items:flex-start;text-align:left}
.titmw-q-br{justify-content:flex-end;align-items:flex-end;text-align:right}
.titmw-q-bl .titmw-q-where,.titmw-q-br .titmw-q-where{order:3}
.titmw-q-where{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:#aeb8c6}
.titmw-q-name{font-family:Georgia,"Times New Roman",serif;font-size:clamp(22px,3.6vw,36px);line-height:1.1}
.titmw-q-read{font-size:13px;letter-spacing:.08em;color:var(--f-gold)}
.titmw-q-read::after{content:" \2192"}
.titmw-q-circle{position:absolute;left:50%;top:50%;width:30%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;
	background:var(--f-paper);border:2px solid var(--f-gold);display:flex;align-items:center;justify-content:center;z-index:1;transition:border-color .2s,box-shadow .2s}
/* The CL!CK logo in the centre circle, linking to complicit.click */
.titmw-q-circle img{width:72%;height:auto;display:block}
a.titmw-q-circle:hover,a.titmw-q-circle:focus-visible{border-color:#fff;box-shadow:0 0 0 4px var(--f-gold);outline:none}

/* A corner page: the text sits in its corner of the sheet */
.titmw-sheet{position:relative;display:flex;flex-direction:column;min-height:max(560px,72vh);padding:clamp(48px,6vw,64px);background:#fff;border:1px solid var(--f-rule);margin-top:14px}
.titmw-sheet::before{content:"";position:absolute;width:44px;height:44px;border:0 solid var(--f-gold)}
.titmw-sheet-tl{justify-content:flex-start;align-items:flex-start;text-align:left}
.titmw-sheet-tr{justify-content:flex-start;align-items:flex-end;text-align:right}
.titmw-sheet-bl{justify-content:flex-end;align-items:flex-start;text-align:left}
.titmw-sheet-br{justify-content:flex-end;align-items:flex-end;text-align:right}
.titmw-sheet-tl::before{top:14px;left:14px;border-top-width:3px;border-left-width:3px}
.titmw-sheet-tr::before{top:14px;right:14px;border-top-width:3px;border-right-width:3px}
.titmw-sheet-bl::before{bottom:14px;left:14px;border-bottom-width:3px;border-left-width:3px}
.titmw-sheet-br::before{bottom:14px;right:14px;border-bottom-width:3px;border-right-width:3px}
/* Navy sheet (default). The vignette option is at the end of this file. */
.titmw-sheet{overflow:hidden;background:var(--f-navy);border-color:var(--f-navy);color:#e3e7ed}
.titmw-sheet .titmw-formal-title{color:#fff}
.titmw-sheet-body a{color:#fff;text-decoration-color:var(--f-gold)}
.titmw-sheet-text{max-width:34em;position:relative;z-index:1}
/* The topic's symbol as a watermark: large, faint, blurred and faded at its edges,
   in the corner opposite the text, filling most of the empty space. */
.titmw-watermark{position:absolute;z-index:0;width:min(60%,540px);aspect-ratio:1;pointer-events:none;
	background:no-repeat center/contain;opacity:.26;filter:blur(2.5px);
	-webkit-mask-image:radial-gradient(closest-side,#000 50%,transparent 100%);mask-image:radial-gradient(closest-side,#000 50%,transparent 100%)}
.titmw-wm-tl{top:1%;left:1%}
.titmw-wm-tr{top:1%;right:1%}
.titmw-wm-bl{bottom:1%;left:1%}
.titmw-wm-br{bottom:1%;right:1%}
@media (max-width:600px){.titmw-watermark{width:78%;opacity:.16}}
.titmw-sheet-tr .titmw-gold-rule,.titmw-sheet-br .titmw-gold-rule{margin-left:auto}
.titmw-sheet-body{line-height:1.7}
.titmw-sheet-body > :first-child{margin-top:0}
.titmw-sheet-body > :last-child{margin-bottom:0}

/* Links under a corner page */
.titmw-corner-nav{margin-top:28px;border-top:1px solid var(--f-rule);padding-top:18px}
.titmw-corner-nav ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.titmw-corner-nav li a{display:block;padding:14px 16px;background:#fff;border:1px solid var(--f-rule);border-top:3px solid var(--f-navy);text-decoration:none;color:var(--f-navy);font-family:Georgia,"Times New Roman",serif;font-size:20px}
.titmw-corner-nav li a:hover,.titmw-corner-nav li a:focus-visible{border-top-color:var(--f-gold)}
.titmw-corner-nav li a span{display:block;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:#5b6472;margin-bottom:4px}
.titmw-formal-back{margin:22px 0 0;text-align:center;font-size:14px}
.titmw-formal-back a{color:var(--f-navy);text-decoration:none;border-bottom:1px solid var(--f-gold);margin:0 12px}
@media (max-width:600px){.titmw-corner-nav ul{grid-template-columns:1fr}.titmw-formal-bar{padding:14px 18px}.titmw-formal-section{font-size:13px;text-align:right}}

/* Corner pages, white option (Appearance -> Customize -> TITMW) */
body.titmw-corners-white .titmw-sheet{background:#fff;border-color:var(--f-rule);color:var(--f-ink)}
body.titmw-corners-white .titmw-sheet .titmw-formal-title{color:var(--f-navy)}
body.titmw-corners-white .titmw-sheet-body a{color:var(--f-navy)}
body.titmw-corners-white .titmw-watermark{opacity:.12;filter:blur(2.5px);
	-webkit-mask-image:radial-gradient(closest-side,#000 50%,transparent 100%);mask-image:radial-gradient(closest-side,#000 50%,transparent 100%)}

/* Corner pages, vignette option: navy darkening to the edges, gold symbols clear and whole */
body.titmw-corners-vignette .titmw-sheet{background:radial-gradient(ellipse 75% 75% at 50% 50%,#22395c 0%,#13233a 58%,#081221 100%)}
body.titmw-corners-vignette .titmw-watermark{opacity:.3;filter:blur(.6px);-webkit-mask-image:none;mask-image:none}
