/* ==========================================================================
   Subterfuge — rulebook & reference theme
   A dark, tactical "around-the-game" look: deep navy-teal depths, a faint
   sonar/topographic field of crosshair markers, thin tracked-out caps, and a
   neptunium teal-green accent glow. Dark background, light text only.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@400;500;600;700&display=swap');

:root {
    --bg-0:        #09131a;   /* deepest water */
    --bg-1:        #0e1c25;   /* base */
    --panel:       rgba(150, 182, 202, 0.06);
    --panel-hover: rgba(150, 182, 202, 0.11);
    --line:        rgba(140, 178, 198, 0.16);
    --line-strong: rgba(140, 178, 198, 0.30);

    --ink:         #e9eff2;   /* primary text */
    --ink-dim:     #a6b8c2;   /* secondary text */
    --ink-faint:   #718997;   /* meta / muted */

    --accent:      #46d6c2;   /* neptunium teal-green */
    --accent-lit:  #82ecdd;   /* accent hover */
    --accent-glow: rgba(70, 214, 194, 0.28);

    --reading:     44rem;     /* text column width */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- atmosphere ---------------------------------------------------------- */

html {
    background-color: var(--bg-0);
    background-image:
        radial-gradient(1100px 620px at 50% -8%, var(--accent-glow), transparent 62%),
        radial-gradient(1000px 900px at 50% 118%, rgba(16, 34, 47, 0.75), transparent 60%),
        linear-gradient(180deg, var(--bg-1), var(--bg-0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg stroke='%2371909f' stroke-opacity='0.16' stroke-width='1'%3E%3Cpath d='M36 30v12M30 36h12'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    background-attachment: fixed, fixed, fixed, fixed;
    scrollbar-color: var(--line-strong) transparent;
}

body {
    max-width: var(--reading);
    margin: 0 auto;
    padding: 0 24px 84px;
    color: var(--ink);
    font-family: 'Cabin', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(70, 214, 194, 0.30);
    color: #ffffff;
}

/* --- wordmark ------------------------------------------------------------ */

body::before {
    content: "SUBTERFUGE";
    display: block;
    text-align: center;
    padding: 34px 0 16px;
    font-weight: 600;
    font-size: clamp(20px, 6vw, 30px);
    letter-spacing: 0.42em;
    text-indent: 0.42em; /* balance the trailing tracking */
    color: var(--ink);
    text-shadow: 0 0 26px var(--accent-glow);
}

/* --- top navigation (styled from the legacy 4-cell table) ---------------- */

table.nav {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 34px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

table.nav p {
    margin: 0;
}

table.nav td {
    width: 25%;
    text-align: center;
    padding: 13px 6px;
    vertical-align: middle;
}

table.nav td + td {
    border-left: 1px solid var(--line);
}

table.nav a {
    color: var(--ink-dim);
    text-decoration: none;
    border: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
    transition: color 0.18s ease;
}

table.nav a:hover {
    color: var(--accent);
}

table.nav a[aria-current="page"] {
    color: var(--accent);
}

table.nav td:has(a[aria-current="page"]) {
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* --- headings ------------------------------------------------------------ */

h1 {
    position: relative;
    margin: 48px 0 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
    font-size: clamp(19px, 4.6vw, 25px);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}

h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 52px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

h2 {
    margin: 8px 0 28px;
    font-size: clamp(21px, 5vw, 27px);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
    text-shadow: 0 0 22px var(--accent-glow);
}

h3 {
    margin: 32px 0 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--accent);
}

/* --- flow text ----------------------------------------------------------- */

p {
    margin: 0 0 16px;
}

ul,
ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

li {
    margin: 0 0 9px;
}

li::marker {
    color: var(--accent);
}

b,
strong {
    color: #ffffff;
    font-weight: 700;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(70, 214, 194, 0.35);
    transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
    color: var(--accent-lit);
    border-bottom-color: var(--accent-lit);
}

/* --- "tying it all together" schematic ----------------------------------
   The diagram is transparent art with black arrows/labels drawn for a light
   background, so it's framed on a light card rather than recoloured.        */

img.diagram {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 22px auto 10px;
    padding: 24px 20px;
    background: #eef4fb;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

/* --- specialist reference ------------------------------------------------ */

img.specialisticon {
    /* Source art is white line-work: show it as-is on the dark background
       (the old invert() only existed to darken it for a white page). */
    filter: none;
    -webkit-filter: none;
    display: block;
    width: 34px;
    height: 34px;
}

table.specialists {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 24px;
}

table.specialists tr {
    border-bottom: 1px solid var(--line);
}

table.specialists td {
    padding: 15px 4px;
    vertical-align: top;
}

table.specialists td:first-child {
    width: 46px;
    padding-right: 12px;
}

table.specialists td:last-child {
    color: var(--ink-dim);
    font-size: 15.5px;
    line-height: 1.5;
}

table.specialists b {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- tutorial videos ----------------------------------------------------- */

iframe {
    max-width: 100%;
    margin-top: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #000000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* --- small screens ------------------------------------------------------- */

@media (max-width: 460px) {
    body {
        font-size: 16px;
        padding: 0 18px 64px;
    }

    table.nav a {
        letter-spacing: 0.10em;
    }
}
