/* JEM Networks site styles
   ---------------------------------------------------------------
   Variable names below the "legacy" marker are used inline by the
   individual tool pages (style='color:var(--red)', etc.). Keep the
   names; change the values freely. */

:root {
 color-scheme: light;

 --page: #f3f5f2;
 --surface: #ffffff;
 --surface-2: #f7f9f6;
 --text: #1c2822;
 --text-soft: #4f5d55;
 --line: #dfe5df;
 --line-strong: #c4cec6;
 --brand: #006232;          /* the logo's green */
 --brand-strong: #004d27;
 --brand-tint: #e6f2ea;
 --link: #00703a;
 --code-bg: #f1f4f0;
 --ring: rgba(0, 98, 50, .28);
 --shadow: 0 1px 2px rgba(20, 40, 30, .05), 0 6px 24px rgba(20, 40, 30, .06);
 --radius: 14px;
 --radius-sm: 8px;
 --wrap: 1040px;

 --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

 /* ---- legacy names, used by tool pages ---- */
 --bg: var(--page);
 --fg: var(--text);
 --accent: var(--brand);
 --accent-fg: #fff;
 --th-bg: var(--brand-tint);
 --th-fg: var(--brand-strong);
 --hr-edge: var(--line);
 --hr-mid: var(--line-strong);
 --logo-filter: none;
 --plain-fg: var(--text);
 --muted: #6b766f;
 --border: var(--line-strong);
 --red: #c62828;
 --blue: #1f5fbf;
 --green: #1e7d3c;
 --purple: #7b3fb0;
 --input-bg: #ffffff;
 --output-bg: #eef7f1;
 --hl-yellow: #fff0a8;
 --hl-pink: #ffd6e0;
 --hl-green: #e3f4e8;
 --hl-palegreen: #eef8f0;
}

@media (prefers-color-scheme: dark) {
 :root {
  color-scheme: dark;

  --page: #0e1411;
  --surface: #151d19;
  --surface-2: #1a241f;
  --text: #e2ebe5;
  --text-soft: #a7b6ad;
  --line: #26332c;
  --line-strong: #364640;
  --brand: #5cc98d;
  --brand-strong: #8be0b0;
  --brand-tint: #1b3326;
  --link: #74d6a0;
  --code-bg: #111915;
  --ring: rgba(92, 201, 141, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);

  --accent-fg: #0e1411;
  --logo-filter: brightness(1.9) saturate(1.1);
  --muted: #8f9c94;
  --red: #ff7b7b;
  --blue: #86aefc;
  --green: #6fd88c;
  --purple: #cf9bff;
  --input-bg: #111915;
  --output-bg: #15281d;
  --hl-yellow: #5c5200;
  --hl-pink: #5e2738;
  --hl-green: #15281d;
  --hl-palegreen: #1a3123;
 }
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
 margin: 0;
 background: var(--page);
 color: var(--text);
 font: 16px/1.6 var(--sans);
 font-variant-numeric: tabular-nums;
}

a {
 color: var(--link);
 text-decoration-thickness: 1px;
 text-underline-offset: .18em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
 outline: 3px solid var(--ring);
 outline-offset: 2px;
}

h1, h2, h3, h4 {
 color: var(--text);
 line-height: 1.25;
 letter-spacing: -.01em;
}
h1 { font-size: 1.9rem; margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.08rem; margin: 1.5rem 0 .5rem; }
h4 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
main > h1:first-child, main > h2:first-child,
main > p:first-child > h2:first-child { margin-top: 0; }
h1 a, h2 a { color: inherit; text-decoration: none; }

p { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin: .3rem 0; }
li::marker { color: var(--brand); }

hr, hr.fade {
 border: 0;
 height: 1px;
 background: var(--line);
 margin: 2rem 0;
}

code, pre, kbd, samp, td.mono { font-family: var(--mono); font-size: .92em; }
pre {
 background: var(--code-bg);
 border: 1px solid var(--line);
 border-radius: var(--radius-sm);
 padding: .85rem 1rem;
 overflow-x: auto;
 line-height: 1.45;
}
blockquote { margin: 0 0 1rem; }

iframe { border: none; width: 100%; height: 1000px; }

/* ---------- header ---------- */

.site-header {
 background: var(--surface);
 border-bottom: 1px solid var(--line);
}
.site-header .wrap {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 1rem;
 flex-wrap: wrap;
 padding-block: .9rem;
}
.brand { display: inline-flex; line-height: 0; }
#logo {
 height: 46px;
 width: auto;
 filter: var(--logo-filter);
}

.site-nav ul {
 display: flex;
 gap: .25rem;
 list-style: none;
 margin: 0;
 padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
 display: block;
 padding: .45rem .95rem;
 border-radius: 999px;
 color: var(--text-soft);
 font-weight: 600;
 font-size: .95rem;
 text-decoration: none;
}
.site-nav a:hover { color: var(--brand); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-tint); }

/* ---------- layout ---------- */

.wrap {
 max-width: var(--wrap);
 margin-inline: auto;
 padding-inline: 1.5rem;
}

main {
 display: block;
 max-width: var(--wrap);
 margin: 2rem auto;
 padding: 2rem 2.25rem;
 background: var(--surface);
 border: 1px solid var(--line);
 border-radius: var(--radius);
 box-shadow: var(--shadow);
 overflow-x: auto;
}
@media (max-width: 1100px) {
 main { margin: 1.25rem; }
}
@media (max-width: 600px) {
 main { margin: 0; border-radius: 0; border-inline: 0; padding: 1.5rem 1.1rem; }
 #logo { height: 38px; }
}

/* Pages designed as a set of cards (home, services, tools) sit
   directly on the page background instead of one big card. */
main.plain {
 background: none;
 border: 0;
 box-shadow: none;
 padding-inline: 1.5rem;
 overflow: visible;
}
@media (max-width: 600px) { main.plain { padding: 1.5rem 1.1rem; } }

/* ---------- footer ---------- */

.site-footer {
 max-width: var(--wrap);
 margin: 0 auto 2.5rem;
 padding: 1.5rem;
 color: var(--muted);
 font-size: .88rem;
 display: flex;
 justify-content: space-between;
 gap: 1rem 2rem;
 flex-wrap: wrap;
 border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.site-footer strong { color: var(--text-soft); }
/* the small "see also" footers some tool pages print */
main + footer, body > footer:not(.site-footer) {
 max-width: var(--wrap);
 margin: 0 auto 2rem !important;
 padding: 0 1.5rem;
 color: var(--muted);
}

/* ---------- forms ---------- */

input[type=text], input[type=search], input[type=email], input[type=number],
input:not([type]), textarea, select {
 font: inherit;
 color: var(--text);
 background-color: var(--input-bg);
 border: 1px solid var(--line-strong);
 border-radius: var(--radius-sm);
 padding: .5rem .7rem;
 max-width: 100%;
 transition: border-color .15s, box-shadow .15s;
}
input[type=text], input:not([type]) { min-width: min(22rem, 100%); }
textarea {
 font-family: var(--mono);
 font-size: .9rem;
 line-height: 1.45;
 margin-bottom: .6rem;
}
input:focus, textarea:focus, select:focus {
 outline: none;
 border-color: var(--brand);
 box-shadow: 0 0 0 3px var(--ring);
}
input[readonly], textarea[readonly] { background-color: var(--output-bg); }

input[type=radio], input[type=checkbox] {
 accent-color: var(--brand);
 width: 1rem;
 height: 1rem;
 vertical-align: -.15em;
 margin: 0 .3rem 0 0;
}
label { margin-right: .9rem; cursor: pointer; }

button, input[type=submit], input[type=button], input[type=reset], .button-link {
 display: inline-block;
 font: inherit;
 font-weight: 600;
 font-size: .95rem;
 line-height: 1.2;
 color: var(--accent-fg);
 background: var(--brand);
 border: 1px solid var(--brand);
 border-radius: var(--radius-sm);
 padding: .55rem 1.1rem;
 cursor: pointer;
 text-decoration: none;
 transition: background .15s, border-color .15s;
}
button:hover, input[type=submit]:hover, input[type=button]:hover, .button-link:hover {
 background: var(--brand-strong);
 border-color: var(--brand-strong);
}
.button-link.secondary {
 color: var(--brand-strong);
 background: var(--surface);
 border-color: var(--line-strong);
}
.button-link.secondary:hover { background: var(--brand-tint); border-color: var(--brand); }

/* ---------- tables ---------- */

table { border-collapse: collapse; margin: 1rem 0; }
th {
 background-color: var(--th-bg);
 color: var(--th-fg);
 font-weight: 600;
 font-size: .9rem;
 text-align: left;
 vertical-align: bottom;
 padding: .55rem .8rem;
 border-bottom: 1px solid var(--line-strong);
}
th:first-child { border-top-left-radius: var(--radius-sm); }
th:last-child { border-top-right-radius: var(--radius-sm); }
th.center { text-align: center; }
td {
 vertical-align: top;
 text-align: left;
 padding: .45rem .8rem;
 border-bottom: 1px solid var(--line);
}
td.center { text-align: center; }
td.chars { font-family: Georgia, serif; }
tbody tr:hover td, table tr:hover > td { background-color: var(--surface-2); }

/* ---------- home / services / tools ---------- */

.hero {
 padding: 2.5rem 0 1.5rem;
}
.eyebrow {
 display: inline-block;
 font-size: .8rem;
 font-weight: 700;
 letter-spacing: .08em;
 text-transform: uppercase;
 color: var(--brand);
 margin-bottom: .6rem;
}
.hero h1 {
 font-size: clamp(2rem, 4.5vw, 3rem);
 letter-spacing: -.025em;
 margin-bottom: 1rem;
}
.lead {
 font-size: 1.15rem;
 color: var(--text-soft);
 max-width: 40rem;
}
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
 gap: 1.25rem;
 margin: 1.5rem 0;
}
.card {
 background: var(--surface);
 border: 1px solid var(--line);
 border-radius: var(--radius);
 box-shadow: var(--shadow);
 padding: 1.4rem 1.5rem;
}
.card h2, .card h3 { margin-top: 0; }
.card h2 { font-size: 1.12rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1rem; }
.card li { margin: .45rem 0; }
.card-icon {
 width: 2.4rem;
 height: 2.4rem;
 display: grid;
 place-items: center;
 border-radius: 10px;
 background: var(--brand-tint);
 color: var(--brand);
 margin-bottom: .9rem;
}
.card-icon svg { width: 1.3rem; height: 1.3rem; }
.muted { color: var(--muted); }
.page-title { margin: 1rem 0 .25rem; }

/* Tools directory */
.card .tool-list { list-style: none; padding: 0; margin: 0; }
.card .tool-list + h3 { margin-top: 1.5rem; }
.card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .6rem; }
.tool-list li { margin: 0; padding: .55rem 0; border-top: 1px solid var(--line); }
.tool-list li:first-child { border-top: 0; padding-top: 0; }
.tool-list li:last-child { padding-bottom: 0; }
.tool-list a { font-weight: 600; text-decoration: none; }
.tool-list a:hover { text-decoration: underline; }
.tool-list .desc a { font-weight: inherit; text-decoration: underline; }
.tool-list .desc { display: block; color: var(--text-soft); font-size: .92rem; }
.ext {
 display: inline-block;
 font-size: .7rem;
 font-weight: 700;
 letter-spacing: .04em;
 text-transform: uppercase;
 color: var(--text-soft);
 border: 1px solid var(--line-strong);
 border-radius: 999px;
 padding: 0 .45rem;
 margin-left: .3rem;
 vertical-align: .1em;
}
.card.wide { grid-column: 1 / -1; }
