/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--gradient-start);
  color: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  z-index: 1000;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

:root {
  /* Light mode (default) */
  --body-background: #f2f4f8;
  --surface: #ffffff;
  --gallery-header: #52BAD5;
  --form-error: #A10C0E;
  --gallery-stats: #595959;           /* was #777 — improved contrast (7:1) */
  --footer-header: #555555;           /* was #939393 — improved contrast */
  --column-header: #444444;           /* was #666 — improved contrast (9.7:1) */
  --body-text: #333333;              /* was #414141 — improved contrast */
  --gradient-start: #22304e;
  --gradient-end: #9797A3;
  --link-color: #4B52D8;              /* was #7378fd — improved contrast (5.3:1) */
  --list-color: #3B45A9;
  --link-hover-color: #08148F;
  --action-button-color: #B1C3F5;
  --action-button-hover-color: #D3D8FD;
  --action-button-text: #1a1a2e;
  --input-gradient-start: #eee;
  --input-gradient-end: #ddd;
  --input-gradient: linear-gradient(to bottom, var(--input-gradient-start), var(--input-gradient-end));
  --gradient: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  --callout-gradient-start: #EDEDED;
  --callout-gradient-end: #D8D7D7;
  --callout-gradient: linear-gradient(to left, var(--callout-gradient-start), var(--callout-gradient-end));
  --table-shaded-row: #D7D7D7;
  --table-header-bg: #1a1a2e;
  --table-header-text: #ffffff;
  --table-border: #999;
  --border-subtle: silver;
  --shadow-color: rgba(0, 0, 0, 0.15);
  --footer-section-bg: #e8e8e8;
  --rollup-bg: #ffffff;
  --toc-shadow: lightgray;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --body-background: #141416;
    --surface: #1e1e22;
    --gallery-header: #52BAD5;
    --form-error: #ff6b6b;
    --gallery-stats: #9a9ab0;
    --footer-header: #b0b0c0;
    --column-header: #a0a3b5;
    --body-text: #d0d2e0;
    --gradient-start: #1a1a2e;
    --gradient-end: #3a3a4a;
    --link-color: #7cacf8;
    --list-color: #8b9cf8;
    --link-hover-color: #a8c4ff;
    --action-button-color: #3a4a7a;
    --action-button-hover-color: #4a5a8a;
    --action-button-text: #e0e0f0;
    --input-gradient-start: #2a2a30;
    --input-gradient-end: #222228;
    --input-gradient: linear-gradient(to bottom, var(--input-gradient-start), var(--input-gradient-end));
    --gradient: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    --callout-gradient-start: #252530;
    --callout-gradient-end: #1e1e28;
    --callout-gradient: linear-gradient(to left, var(--callout-gradient-start), var(--callout-gradient-end));
    --table-shaded-row: #252530;
    --table-header-bg: #2a2a3a;
    --table-header-text: #e0e0f0;
    --table-border: #3a3a4a;
    --border-subtle: #3a3a4a;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --footer-section-bg: #222230;
    --rollup-bg: #1e1e22;
    --toc-shadow: rgba(0, 0, 0, 0.3);
  }
}

/* High contrast */
@media (prefers-contrast: high) {
  :root {
    --body-background: #ffffff;
    --surface: #ffffff;
    --body-text: #000000;
    --column-header: #000000;
    --footer-header: #000000;
    --gallery-stats: #000000;
    --link-color: #0000cc;
    --link-hover-color: #000066;
    --border-subtle: #000000;
    --table-border: #000000;
  }
}

@media (prefers-contrast: high) and (prefers-color-scheme: dark) {
  :root {
    --body-background: #000000;
    --surface: #000000;
    --body-text: #ffffff;
    --column-header: #ffffff;
    --footer-header: #ffffff;
    --gallery-stats: #cccccc;
    --link-color: #99bbff;
    --link-hover-color: #ffffff;
    --border-subtle: #ffffff;
    --table-border: #ffffff;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--body-background);
  font-style: normal;
  font-weight: 300;
  margin: 0;
  min-width: 320px;
}

a[href] {
  color: var(--link-color);
  text-decoration: none;
}

a[href]:hover {
  color: var(--link-hover-color);
  font-weight: normal;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: auto;
  background-color: var(--surface);
  overflow-x: hidden;
}


.content-target {
  display: block;
  border-bottom: 0.25em solid var(--border-subtle);
  padding: 0.5em 1em 1em 1em;
}

.annex { font-weight: 400;}

.content-page {
  padding: 0.5em 2em 1em 2em;
  overflow: hidden;
  height: auto;
  max-width: 100%;
  box-sizing: border-box;
  /*border-bottom: 0.25em solid silver;*/
  color: var(--body-text);
  display: block;
}

.with-background {
  padding-top: 0.5em;
  background-image: url(/images/RESCOR-TMRRPM-1.jpg);
  background-color: var(--surface);
  opacity: 0.95;
  background-size: 100% auto;
  font-weight: 350;
  background-blend-mode: lighten;
  background-repeat:no-repeat;
}

.content-page h1,
.content-page h2,
.content-page h3,
.content-page h4 {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.content-page h1 {
  font-size: 1.9em;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.4em;
  margin-bottom: 0.5em;
  color: var(--gradient-start);
}

@media (prefers-color-scheme: dark) {
  .content-page h1 {
    color: #c0d4ff;
  }
}

.content-page h2 {
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gradient-start);
  margin-top: 1.25em;
  margin-bottom: 0.35em;
  padding-bottom: 0.1em;
  border-bottom: 1px solid var(--border-subtle, silver);
}

@media (prefers-color-scheme: dark) {
  .content-page h2 {
    color: #8bacd8;
    border-bottom-color: rgba(139, 172, 216, 0.25);
  }
}

.content-page h3 {
  font-size: 1.18em;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.1em;
  margin-bottom: 0.3em;
  color: var(--link-hover-color);
}

@media (prefers-color-scheme: dark) {
  .content-page h3 {
    color: #a8c4ff;
  }
}

.content-page h4 {
  font-size: 1.0em;
  font-weight: 700;
  margin-top: 0.9em;
  margin-bottom: 0.25em;
  color: var(--body-text);
}

.content-page p {
  margin-top: 0.3em;
  margin-bottom: 0.5em;
}

/* Headings and paragraphs flow around floated TOC instead of clearing */
.content-page h2,
.content-page h3,
.content-page h4,
.content-page p,
.content-page ul {
  overflow: visible;
}

/* Style H1 that is followed directly by H2 (subtitle pattern) */
.content-page h1:has(+h2) {
    margin-bottom: 0em;
    padding-bottom: 0em;
}

/* Subtitle H2: ONLY when it is the adjacent sibling of H1 */
.content-page h1 + h2 {
  color: var(--gallery-stats);
  font-size: 1.0em;
  font-weight: 500;
  margin-top: 0.2em;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0.6em;
  border-bottom: none;
}

.content-page p {
  letter-spacing: calc(1em/30);
}

.background-image {
  z-index: 1;
  position: relative;
}

.background-image::before {
  content: "";
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;  
  z-index: -1;
  opacity: 0.1;
  background-image: url("../images/RESCOR-TMRRPM-1.jpg");
}

header {
  display: block;
  margin-bottom: 0.667em;
}

header .header-container {
  width: 100%;
  height: 4em;
  display: flex;
  align-items: center;
}

header center {
  clear: both;
}

.header-button {
  /*display: inline-block;*/
  padding-left: 0.5em;
  padding-right: 0.5em;
  text-align: center;
  width: 12em;
  height: 1.75em;
  font-size: 1em;
  background-color: var(--action-button-color);
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  box-shadow: 4px 4px 3px 2px var(--shadow-color);
  font-size: 50%;
  cursor: pointer;
  float: right;
  margin-right: 1em;
  margin-bottom: 0.667em;
  padding-bottom: 0.5em;
  border-radius: 5px
}

.tiny {
  font-size: 40%;
}

.toc {
  float: left;
  align-self: start;
  width: max-content;
  max-width: 35%;
  background: var(--callout-gradient);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.5em 0.75em;
  margin-right: 1em;
  margin-bottom: 1em;
}

.site-map-link-image {
  width: 2.0em;
  height: 2.0em;
  margin-right: calc(1em/3);
  vertical-align: middle;
  padding-bottom: calc(1em/3);
}

.site-map ul {
  list-style: none;
  padding-left: 0;
}

.site-map li {
  line-height: 1.25em;
}

.site-map a {
  color: var(--link-color);
  text-decoration: none;
}

.site-map a:hover {
  color: var(--link-hover-color);
  font-weight: 500;
}

.toc h1.toc_header {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 0.95em;
  font-weight: 500;
  padding-top: 0;
  padding-bottom: 0.2em;
  margin-bottom: 0.3em;
  border-bottom: thin solid var(--border-subtle);
}

h2.toc_entry {
  font-size: 85% !important;
  margin-bottom: 0.2em !important;
  font-weight: 400;
  letter-spacing: 0.333px;
}

h3.toc_entry {
  font-size: 80% !important;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 1em;
  padding-top: 0;
  padding-bottom: 0.167em;
}

.toc_entry a {
  color: var(--link-color);
  text-decoration: none;
}

.toc_entry a:hover {
  color: var(--link-hover-color);
  text-decoration: none;
}

.definition-grid {
  clear: right;
  width: 100%;
  letter-spacing: 0.5px;
}

.definition-grid .entry{
  display: grid;
  grid-template-columns: [term] 45%;
  grid-template-areas: "term definition";
  align-items: start;
  gap: 0 .25rem;
}

.definition-grid .term {
  grid-area: term;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  padding-right: 0.5em;
}

.definition-grid .term::after {
  position: absolute;
  padding-left: 0.5em;
  padding-right: 0.5em;
  content: "   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "
            ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ";
  font-size: xx-small;
  padding-top: 0.6em;
  text-align: right;
}

.definition-grid .definition {
  grid-area: definition;
  padding-bottom: 0.5em;
}

.structured-table {
	display: table;
  border-collapse: collapse;
	width: 100%;
	padding-top: 1em;
}

.structured-table thead tr {
  background-color: var(--table-header-bg);
  color: var(--table-header-text);
  font-weight: bold;
  text-align: left;
}

.structured-table thead th {
  padding: 0.25em;
}

.structured-table td, .structured-table th {
  border: 1px solid var(--table-border);
  padding: 0.5em;
  margin: 0;
}

.structured-table tr td {
	vertical-align: top;
}

.structured-table tr td:nth-of-type(1) {
	font-weight: bold;
}

.structured-table tbody tr:nth-child(odd) {
  background-color: var(--input-gradient-start);
}

.structured-table tbody tr:nth-child(even) {
  background-color: var(--table-shaded-row);
}
.structured-table tr td:nth-of-type(2) {
  width: auto;
  letter-spacing: 0.25px;
}
.structured-table tr td:nth-of-type(3) {
	font-weight: 400;
}

/* Highlighted aside — full-width emphasis block with left accent */
.callout {
  display: block;
  margin: 1em 0;
  padding: 0.75em 1em 0.75em 1.25em;
  border-left: 4px solid var(--gradient-start);
  background: var(--callout-gradient);
  border-radius: 0 6px 6px 0;
  font-size: 90%;
  font-weight: 300;
}

@media (prefers-color-scheme: dark) {
  .callout {
    border-left-color: #5580bb;
  }
}

.callout h2 {
  font-size: 1.05em;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0.4em;
  color: var(--gradient-start);
}

@media (prefers-color-scheme: dark) {
  .callout h2 {
    color: #8bacd8;
  }
}

.callout h4 {
  font-size: 90%;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0;
}

ul.check-list.compressed li {
  margin-bottom: 0;
}

.check-list {
  list-style: none;
  text-indent: -2.8em;
  padding-left: 2em;
  margin-top: 0;
  margin-bottom: 0;
}

.check-list li:before {
  content: '\2713';
  margin: 0 1em;
}

.check-list li {
  margin-bottom: 0.5em;
}

.formatted_table {
  display: table;
  box-shadow: 3px 3px 3px 2px var(--shadow-color);
  width: 100%;
  max-width: 50em;
}

.formatted_table tr th {
  vertical-align: top;
  color: white;
  background-color: var(--gradient-start);
  text-align: left;
}

.motd img.left {
  aspect-ratio: 1/1;
  width: 10vw;
  float: left;
  padding-right: 1em;
  min-width: 5em;
}

.left-float {
  float: left;
}

.left-float img.square-image {
  aspect-ratio: 1/1;
}

.formatted_table tr:nth-child(even) {
  background-color: var(--table-shaded-row);
}

.right-float {
  float: right;
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.right-float img.square-image {
  aspect-ratio: 1/1;
}

.right-float img {
  aspect-ratio: 12 /5;
  width: 50vw;
}

.right-float p {
  font-weight: 400;
  font-size: 75%;
  text-align: center;
}

.short_example {
  width: 100%;
  align-content: center;
  min-width: 32em;
  max-width: 40em;
}

.gradient {
  background-image: var(--gradient);
}

.logo {
  color: white;
  width: 10em;
  height: 2em;
  margin-left: 1em;
  flex-shrink: 0;
}

.logo-details {
  font-family: "neuropol-nova", sans-serif;
  font-size: 200%;
  color: #f2f4f8;
  margin-left: auto;
  margin-right: 0.5em;
}

@media (prefers-color-scheme: dark) {
  .logo-details {
    color: #d0d2e0;
  }
}

nav {
  clear: both;
  display: flex;
  flex-direction: row;
  justify-items: flex-start;
  width: 100%;
  background: var(--gradient);
  border-top: solid thin white;
}

.break {
  flex-basis: 100%;
  height: 0;
}

nav .navitem a {
  color: white;
  text-decoration: none;
  font-size: 0.666em;
}

nav .navitem:last-of-type {
  margin-right: 0;
}

nav .navitem a:hover {
  font-weight: bold;
}

nav .navitem {
  text-align: left;
  flex-basis: 30em;
  font-weight: normal;
  font-size: 1em;
  letter-spacing: 1px;
  padding-bottom: 0.25em;
  padding-left: 0.667em;
  border-left: solid thin white;
  border-right: solid thin white;
}

/*
.header-button {
  display: inline-block;
  padding-left: 0.5em;
  padding-right: 0.5em;
  text-align: center;
  width: 12em;
  height: 1.75em;
  font-size: 1em;
  background-color: var(--action-button-color);
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  box-shadow: 4px 4px 3px 2px grey;
}
*/

.spaced-list {
  list-style: square;
  overflow: auto;
}

.spaced-list li {
  padding-top: 0.333em;
  padding-bottom: 0.333em;
}

/* Prevent bullets from impinging on floated elements */
.content-page ul {
  overflow: hidden;
}

.emphasize {
  font-weight: 400;
}

.about {
  gap: 1em;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  overflow: scroll;
  margin-bottom: 1em;
  border-bottom: 0.25em solid var(--border-subtle);
}

.text_column,
.text-column {
  flex-basis: 29%;
  min-width: 15em;
  padding-left: 1em;
  padding-right: 1em;
  font-weight: lighter;
  color: var(--body-text);
  letter-spacing: 0.333px;
  line-height: 1.25em;
}

.text_column h3,
.text-column h3 {
  color: var(--column-header);
  display: inline;
  font-size: 100%;
}

.text_column h3:after,
.text-column h3:after {
  content: ".";
  padding-right: 0.5em;
}

.gallery {
  gap: 1vw;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 86vw;
  height: 25vw;
  overflow: scroll;
  padding: 0 1vw 1vw 1vw;
  text-align: center;
}

.gallery .thumbnail {
  width: 21vw;
  font-size: 85%;
}

.gallery .stats {
  font-size: clamp(12pt, 3em, 18pt);
  font-weight: bold;
  color: var(--gallery-stats);
  margin: 0;
  padding: 0;
}

.gallery h4 {
  margin: 1vw;
  color: var(--gallery-header);
  display: block;
  font-weight: bold;
  unicode-bidi: isolate;
}

.gallery p {
  text-align: left;
  font-size: 90%;
  color: var(--body-text);
}

.footer-flex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  height: auto;
}

.footer-column {
  flex-basis: 45%;
  min-width: 15em;
  padding: 0 1em 1em 1em;
  margin-bottom: 1em;
  /*border-top: 0.666vw solid silver; */
}

.footer-column h3 {
  color: var(--footer-header);
  background-color: var(--footer-section-bg);
  text-align: center;
  /*margin-left: 2em;*/
  /*margin-right: 2em;*/
}

.footer-column p {
  line-height: 1.25em;
  text-align: left;
  font-weight: lighter;
  color: var(--body-text);
  letter-spacing: 0.333px;
}

.footer-column h4 {
  text-align: left;
  padding: 0;
  color: var(--column-header);

}

.copyright {
  display: block;
  height: 3.5em;
}

.copyright-text {
  color: var(--gallery-stats);
  font-weight: 300;
  font-size: 90%;
  float: right;
  margin-top: 1.333em;
  margin-right: 2em;
}

.trademark {
  font-size: 75%;
  font-weight: 500;
  color: var(--column-header);
  padding-left: 1em;
}

.footer-column ul {
  list-style: square;
  text-align: left;
  margin-left: -1em;
}

.footer-column li {
  color: var(--body-text);
  letter-spacing: 0.333px;
  line-height: 1.25;
  font-weight: lighter;
  padding-bottom: .25em;
}

.footer-column li:last-of-type {
  padding-bottom: 0;
}

.footer-column img.cards {
  display: block;
  width: 50%;
  margin: auto;
  max-width: 130px;
  max-height: 150px;
}

@keyframes smooth-appear {
  to {
    bottom: 20px;
    opacity: 1;
  }
}

.rollup {
  text-align: left;
  background: var(--rollup-bg);
  color: var(--body-text);
  width: min(90vw, 40em);
  padding: 1em;
  position: sticky;
  top: 50%;
  transform: translateX(-5%);
  opacity: 0;
  border-radius: 3px;
  border: thin solid var(--column-header);
  box-shadow: 8px 8px 3px 2px var(--shadow-color);
  animation: smooth-appear 1s ease forwards;
}

.rollup h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.75em;
  padding-top: 0;
  padding-bottom: 0;
  font-size: medium;
  text-transform: uppercase;
}

.rollup p {
  font-size: 90%;
  font-weight: 400;
  letter-spacing: calc(2px/3);
  margin: 0 !important;
  padding: 0 0 .75em 0 !important;
  line-height: normal !important;
}

.rollup p a {
  color: var(--link-color);
  font-weight: 300;
}

.rollup p a:hover {
  color: var(--link-hover-color);
  text-decoration: none;
}

.contactFormErrors {
  list-style-type: square;
}

.contactFormErrors li {
  font-weight: bold;
  color: var(--form-error);
}

.divTable {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25em 0.5em;
  width: 100%;
}

.divRow {
  display: contents;
}

.divCell {
  text-align: left;
  padding: .25em .5em .75em .5em;
}

.check-list
{
	list-style: none;
	text-indent: -2.8em;
	padding-left: 2em;
}

.check-list li:before
{
	content: '\2713';
	margin: 0 1em;
}

.check-list li ul li
{
	text-indent:0;
}

.check-list li ul li:before
{
	content: none;
	margin: auto;
}

.flexCallout {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow: auto;
  min-width: 280px;
  width: 45%;
  gap: 1em;
}

.flexCallout .image {
  flex: 0 0 auto;
  flex-basis: auto;
}

.flexCallout .description {
  flex: auto;
  flex-basis: auto;
  font-size: min(12px, calc(9px + 0.5vw));
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.flexCallout .description quote {
  font-weight: 400;
}

.flexRow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0.75em;
  gap: 1em;
}

.flexColumn {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.flexColumn h2, .flexCallout h2 {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 1.05em;
  font-weight: 500;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  color: var(--body-text);
}

.flexCallout h2 {
  font-size: min(15px, calc(10px + 1vw));
}

.flexColumn a, .flexCallout a {
  color: var(--link-color);
  text-decoration: none;
}

.flexColumn a:hover, .flexCallout a:hover {
  color: var(--link-hover-color);
  font-weight: bold;
  text-decoration: none;
}

.square-image {
  aspect-ratio: 1 / 1;
  object-fit: fill;
  width: 20vw;
  min-width: 5em;
  max-width: 10em;
}

.divCell ul li,
.flexCell ul li {
  color: var(--list-color);
}

.divCell img,
.flexCell img:not(.square-image) {
  height: 162px;
  width: 162px;
  object-fit: fill;
}

.flexCell ul {
  flex-direction: column;
  margin-top: 0;
  padding-top: 0;
}

.divCell ul li a,
.flexCell ul li a {
  color: var(--link-color);
}

.divCell ul li a:hover,
.flexCell ul li a:hover {
  color: var(--link-hover-color);
}

.divSpreadCell {
  text-align: left;
  vertical-align: top;
  width: 75%;
  padding: .25em .5em .75em .5em;
  display: table-cell;
}

.divLabelCell {
  font-size: 80%;
  font-weight: 400;
  width: 15%;
}

.divCell input[type="text"],
.divCell input[type="password"],
.divCell textarea {
  width: 98%;
  padding: .2em;
  border-radius: 3px;
  background-image: var(--input-gradient);
}

.divCell input.fix,
.divCell textarea.fix {
  background-image: var(--input-gradient);
}

.smallerActionButton {
  background-color: var(--action-button-color);
  padding: .3em;
  font-size: 80%;
  font-weight: 400;
  border-radius: 2px;
  border: thin solid var(--border-subtle);
  width: 5em;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  color: var(--body-color);
  cursor: pointer;
}

.smallerActionButton:hover {
  background-color: var(--action-button-hover-color);
}

div.actionButton,
button.actionButton {
  text-align: center;
  width: 10em;
  display: inline-block;
  font-size: 14pt;
  font-weight: 400;
  background-color: var(--action-button-color);
  color: var(--action-button-text);
  border: none;
  padding: .5em .5em;
  cursor: pointer;
  margin-top: 1em;
  border-radius: 3px;
  transition: background-color 0.15s, transform 0.1s;
}

div.actionButton:hover,
button.actionButton:hover {
  background-color: var(--action-button-hover-color);
}

div.actionButton:active,
button.actionButton:active {
  transform: scale(0.97);
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-hero {
  display: flex;
  gap: 2em;
  align-items: flex-start;
  margin-bottom: 2em;
}

.about-portrait {
  width: 180px;
  height: auto;
  border-radius: 8px;
  box-shadow: 4px 4px 8px var(--shadow-color);
}

.about-intro {
  flex: 1;
}

.about-pillars {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
  margin-bottom: 2em;
}

.about-pillar {
  flex: 1 1 280px;
  padding: 1em;
  background: var(--callout-gradient);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.about-pillar h3 {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-weight: 500;
  margin-top: 0;
  color: var(--column-header);
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  margin-bottom: 1.5em;
}

.about-details h2 {
  margin-bottom: 0.75em;
}

.about-col {
  min-width: 0;
}

.compact-list {
  list-style: square;
  padding-left: 1.25em;
  margin: 0;
}

.compact-list li {
  padding: 0.1em 0;
  line-height: 1.4;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2em;
  align-items: start;
}

.contact-form-section form {
  max-width: 36em;
}

.form-field {
  margin-bottom: 1em;
}

.form-field label {
  display: block;
  font-weight: 400;
  margin-bottom: 0.25em;
  color: var(--body-text);
}

.form-field .required {
  color: var(--form-error);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  padding: 0.5em 0.75em;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--input-gradient);
  color: var(--body-text);
  font-family: inherit;
  font-size: 1em;
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--link-color);
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--link-color) 25%, transparent);
}

.form-field input.fix,
.form-field textarea.fix {
  border-color: var(--form-error);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--form-error) 20%, transparent);
}

.form-field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
}

.form-field-checkbox input[type="checkbox"] {
  margin-top: 0.25em;
  width: auto;
}

.form-field-checkbox label {
  font-weight: 300;
  font-size: 0.9em;
}

.form-actions {
  display: flex;
  gap: 0.75em;
  margin-top: 1.5em;
}

.actionButton.secondary {
  background-color: var(--callout-gradient-start);
  color: var(--body-text);
  border: 1px solid var(--border-subtle);
}

.actionButton.secondary:hover {
  background-color: var(--callout-gradient-end);
}

.form-note {
  font-size: 0.8em;
  color: var(--gallery-stats);
  margin-top: 1em;
}

.contact-status {
  margin-bottom: 1em;
}

.contact-info-section {
  padding-top: 1em;
}

.contact-card {
  background: var(--callout-gradient);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1em;
  margin-bottom: 1em;
}

.contact-card h3 {
  margin: 0 0 0.5em 0;
  font-size: 1em;
  color: var(--column-header);
}

.link-button {
  background: none;
  border: none;
  color: var(--link-color);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

.link-button:hover {
  color: var(--link-hover-color);
}

/* ==========================================================================
   Footer (2-tier: logo + columns, then legal)
   ========================================================================== */

.footer-dark {
  background: var(--gradient-start);
  color: #c0c4d0;
  font-size: 0.85em;
  line-height: 1.6;
}

/* Tier 1: Logo left, columns right */
.footer-top {
  display: flex;
  align-items: flex-start;
  padding: 2em 2em 1.5em;
}

.footer-logo-area {
  flex-shrink: 0;
  width: 10em;
  padding-top: 0.25em;
}

.footer-logo {
  width: 8em;
  height: auto;
  opacity: 0.9;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5em;
  flex: 1;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.9em;
  font-weight: 600;
  margin: 0 0 0.5em 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col a {
  display: block;
  color: #a0a8c0;
  text-decoration: none;
  padding: 0.15em 0;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-address,
.footer-phone {
  display: block;
  color: #8890a8;
  font-size: 0.9em;
  margin-top: 0.75em;
  line-height: 1.4;
}

/* Tier 2: Legal — aligned under columns, not under logo */
.footer-bottom {
  margin-left: 10em;
  padding: 0 2em;
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75em 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
  gap: 0.5em;
}

.footer-legal-links {
  display: flex;
  gap: 1.5em;
  align-items: center;
}

.footer-legal-links a,
.footer-legal-links button {
  color: #8890a8;
  text-decoration: none;
  font-size: 0.9em;
}

.footer-legal-links a:hover,
.footer-legal-links button:hover {
  color: #ffffff;
}

.footer-copyright {
  color: #687088;
  font-size: 0.85em;
}

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 2px solid var(--border-subtle);
  padding: 1em 2em;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  z-index: 9999;
  box-shadow: 0 -4px 12px var(--shadow-color);
  flex-wrap: wrap;
}

/* Push body content up so fixed banner doesn't obscure footer */
body:has(.cookie-banner[style*="flex"]) {
  padding-bottom: 5em;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9em;
  color: var(--body-text);
  flex: 1;
  min-width: 200px;
}

.cookie-actions {
  display: flex;
  gap: 0.75em;
  align-items: center;
}

.cookie-actions a {
  font-size: 0.85em;
  color: var(--link-color);
}

/* ==========================================================================
   Page directory (home page)
   ========================================================================== */

.page-directory {
  padding: 1em;
}

.page-directory h2 {
  margin-bottom: 0.25em;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1em;
  margin-top: 1em;
}

.page-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75em;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  text-decoration: none;
  color: var(--body-text);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.page-card:hover {
  border-color: var(--link-color);
  box-shadow: 0 4px 12px var(--shadow-color);
  color: var(--link-color);
}

.page-card-image {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5em;
}

.page-card-title {
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.3;
}

/* ==========================================================================
   Definition list (term + hanging indent description)
   ========================================================================== */

.def-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2em 1.5em;
  margin: 0.5em 0;
}

.def-list dt {
  font-weight: 600;
  white-space: nowrap;
}

.def-list dd {
  margin: 0;
}

/* ==========================================================================
   Nav consult button
   ========================================================================== */

.nav-consult {
  margin-left: auto;
  border-left: none !important;
  border-right: none !important;
}

.nav-consult-btn {
  background: var(--gradient-start);
  color: white;
  border: none;
  border-radius: 0;
  padding: 0.25em 0.667em;
  font-size: 0.666em;
  font-weight: normal;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 1px;
  transition: background-color 0.2s;
}

.nav-consult-btn:hover {
  font-weight: bold;
}

/* User icon / dropdown menu — positioned in header next to "Cyber Security" */
.header-user {
  position: relative;
  margin-left: 1em;
  margin-right: 1.5em;
  display: flex;
  align-items: center;
}
.nav-user-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25em;
  display: flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-user-btn:hover {
  opacity: 1;
}
.nav-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #ccc);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 1000;
  padding: 0.25em 0;
}
.nav-user-menu.open {
  display: block;
}
.nav-user-info {
  padding: 0.5em 1em;
  font-size: 0.85em;
  color: var(--text-subdued, #666);
  border-bottom: 1px solid var(--border-color, #eee);
}
.nav-user-info:empty {
  display: none;
}
.nav-user-menu a {
  display: block;
  padding: 0.4em 1em;
  color: var(--text-color, #333);
  text-decoration: none;
  font-size: 0.85em;
}
.nav-user-menu a:hover {
  background: var(--bg-hover, #f0f0f0);
}
.nav-user-menu hr {
  margin: 0.25em 0;
  border: none;
  border-top: 1px solid var(--border-color, #eee);
}
/* Auth-state menu visibility: hide everything until JS sets data-auth */
.nav-user-menu .auth-only,
.nav-user-menu .noauth-only,
.nav-user-menu hr.auth-only {
  display: none;
}
.nav-user-menu[data-auth="true"] .auth-only,
.nav-user-menu[data-auth="true"] hr.auth-only {
  display: block;
}
.nav-user-menu[data-auth="false"] .noauth-only {
  display: block;
}

/* ==========================================================================
   Success dialog overlay
   ========================================================================== */

.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.success-dialog {
  background: var(--surface);
  color: var(--body-text);
  border-radius: 8px;
  padding: 2em 2.5em;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 20em;
}

.success-dialog p {
  margin: 0 0 1.5em 0;
  font-size: 1em;
  font-weight: 400;
}

.success-dialog .actionButton {
  margin-top: 0;
  width: 6em;
}

/* Publication date */
.publish-date {
  font-size: 0.8em;
  color: var(--gallery-stats);
  margin-bottom: 0.5em;
}

/* Focus styles (accessibility) */
:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */

/* Tablet and below */
@media (max-width: 768px) {
  .about-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    padding: 1.5em 1em;
  }

  .footer-logo-area {
    width: auto;
    margin-bottom: 1em;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    margin-left: 0;
    padding: 0 1em;
  }

  .footer-legal {
    flex-direction: column;
    text-align: center;
  }

  .flexCallout {
    width: 100%;
    min-width: 0;
  }

  .flexRow {
    flex-direction: column;
  }

  .gallery {
    width: 100%;
    height: auto;
    flex-wrap: wrap;
  }

  .gallery .thumbnail {
    width: 45%;
  }

  .toc {
    float: none;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 1em;
  }

  .right-float {
    float: none;
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .right-float img {
    width: 100%;
    max-width: 30em;
  }

  .callout {
    margin-left: 0;
    margin-right: 0;
  }

  .divTable {
    grid-template-columns: 1fr;
  }

  .rollup {
    transform: none;
  }
}

/* Phone */
@media (max-width: 480px) {
  .header-container {
    height: auto;
    padding-bottom: 0.5em;
  }

  .logo {
    float: none;
    display: block;
    margin: 0.5em auto 0;
  }

  .logo-details {
    float: none;
    display: block;
    text-align: center;
    font-size: 150%;
    margin: 0;
  }

  nav .navitem {
    flex-basis: auto;
    font-size: 0.85em;
    padding-left: 0.4em;
    border-left: none;
    border-right: none;
  }

  .content-page h1 {
    font-size: 1.2em;
  }

  .header-button {
    float: none;
    display: block;
    margin: 0.5em auto;
  }

  .square-image {
    width: 40vw;
    max-width: 8em;
  }

  .flexCallout .description {
    font-size: 12px;
  }

  .footer-column img.cards {
    max-width: 100px;
    max-height: 115px;
  }
}

/* Print stylesheet */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .skip-link, nav, .rollup, .carousel-controls, #resume-auto-rotate {
    display: none;
  }
  .container {
    width: 100%;
    background: #fff;
  }
  a[href] {
    color: #000;
    text-decoration: underline;
  }
  .gradient {
    background-image: none;
    background-color: #333;
  }
  /* Expand all tabs for printing */
  .tab-nav {
    display: none;
  }
  .tab-panel {
    display: block !important;
    border-top: 1px solid #ccc;
    padding-top: 0.5em;
  }
  /* Hide interactive elements */
  .nav-consult, .cookie-banner, .header-button {
    display: none;
  }
}