:root {
  --brand-color: white;
  --shadow-factor: 1;

}
.wy-nav-content {
  --brand-color: var(--ts3d-dk-blue);
}

h1 {
  --brand-color: var(--ts3d-dk-grey);
  --shadow-factor: 3; 
}

.card {
  --brand-color: var(--ts3d-dk-blue);
}

p {
  line-height: 1.25;
}

*:has(> .card-wrapper) {
  container: wrap / inline-size;
}

.card-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 2em;
  grid-template-areas:
    'insight''insight-xr''convert'
    'manage''publish';
  justify-items: center;
}

.card {
  --brand-color: var(--ts3d-dk-blue);
  --shadow-factor: 4;
  container: card / inline-size;
  display: grid;
  grid-template-rows: repeat(2, auto) 1fr;
  width: clamp(35ch, 100%, 50ch);
  padding: 1em;
  background: white;
  border: 1px solid hsl(from var(--brand-color) h calc(s / 2.5) calc(l * 2.5) / 75%);
  border-radius: 0.5rem;
  box-shadow: 0 4px 4px rgba(0, 0, 64, 10%);
  overflow: hidden;
  transition: 0.15s;
  &:hover {
    border-color: var(--ts3d-lt-grey);
    box-shadow: 0 6px 6px rgba(0, 0, 64, 7%);

    .headline {
      --shadow-factor: 3;
    }
  }

  .headline {
    --shadow-factor: 4;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-gap: 1.5em;
    margin: -1em -1em 0;
    padding: 1em;
    background: radial-gradient(50% 200% at 10%, color(from var(--brand-color) srgb r g b / 15%) 0%, hsl(from var(--brand-color) h calc(s/1.5) calc(l *3)) 100%);
    color: black;
    transition: 0.25s;
    border-bottom: 1px solid hsl(from var(--brand-color) h calc(s/1.5) calc(l * 3));

    > * {
      grid-column: 1;
    }

    .tagline {
      --shadow-factor: 1.1;
      grid-row: 2;
      margin: 0;
      font-weight: normal;
      text-align: center;
      font-size: .875em;
      line-height: 1.5;
      /* text-shadow: 1px 1px 1.5px hsl(from var(--brand-color) h s calc(l / var(--shadow-factor))); */
      color: var(--ts3d-dk-grey);
    }
  }

  ul {
    grid-row: 3;
    margin: 1em 0 .25em 0 !important;
    padding: 0;
  }

  li {
    margin: 0;
    line-height: 1.25;

    & + li {
      margin-top: 0.75em;
    }
  }
}
/*

*/

@container card (min-width: 35ch) {
  .card .headline {
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 1fr;
    align-items: start;
    
    .tagline {
      grid-column: 2;
      grid-row: 1;
      text-align: initial;
    }
  }   
}

@container wrap (min-width: 72ch) and (max-width: 109.99ch) {
  .card-wrapper {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
    'insight insight-xr'
    'convert manage'
    'publish';
  }
}

@container (min-width: 110ch) {
  .card-wrapper {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
    'insight insight-xr convert'
    'manage publish';
  }
}
/* ================================
   Windchill matrix (csv-table) skin
   ================================ */


/* If your theme collapses the rightmost table border, this keeps it visible */
table.windchill-matrix {
  border-collapse: separate;          /* override if a theme forces collapse */
  border-spacing: 0;                   /* keep tight grid */
}


/* Cells: borders & padding */
table.windchill-matrix th,
table.windchill-matrix td {
  border: 1px solid #99acc2;
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.35;
}

/* Header row = dark blue */
table.windchill-matrix:not(.v6) thead th {
  background: #104267;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}
table.windchill-matrix:not(.v6) thead th:last-child {
  color: rgb(39, 38, 38);
  font-weight: 900;
}
/* Last header cell = grey */
/* Ensure borders remain visible on the last column (header + body) */
table.windchill-matrix:not(.v6) thead th:last-child,
table.windchill-matrix:not(.v6) tbody td:last-child {
  /* keep the grey background + italic you already set */
  background: #e1e1e1 !important;
  font-style: italic;

  /* re-assert borders on all sides */
  border-top: 1px solid #99acc2 !important;
  border-right: 1px solid #99acc2 !important;
  border-bottom: 1px solid #99acc2 !important;
  border-left: 1px solid #99acc2 !important;

  /* optional: add an outline for extra contrast on some themes */
  outline: 0;
}

/* First column = cyan (all rows) */
table.windchill-matrix:not(.v6) tbody td:first-child {
  background: #b3e0f6 !important;
  font-weight: 700;
  text-align: left;
}

/* Last column = grey (all rows) */
table.windchill-matrix:not(.v6) tbody td:last-child {
  background: #e1e1e1 !important;
  font-style: italic;
}

/* Middle cells = white */
table.windchill-matrix tbody td {
  background: #ffffff;
}

/* Override priority to keep first and last correct */
table.windchill-matrix:not(.v6) tbody td:first-child {
  background: #b3e0f6 !important;
}
table.windchill-matrix:not(.v6) tbody td:last-child {
  background: #e1e1e1 !important;
}

/* Links */
table.windchill-matrix thead a { color: #ffffff; }
table.windchill-matrix tbody a {
  color: #268ece;
  text-decoration: none;
}
table.windchill-matrix tbody a:hover,
table.windchill-matrix tbody a:focus {
  text-decoration: underline;
}
/* Center the sphinxcontrib-video output */
video.center-video {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  height: auto;
}

/* Also handle when :align: center is used */
video.center-video,
div.align-center > video {
  display: block;
  margin: 1rem auto;
  border-radius: 1.375rem;
  max-width: 66%;
  height: auto;
}

/* HostID / Licensing tables – clean style */
table.hostid_table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;   /* keep only the outer border */
  border-spacing: 0;
  font-size: 0.95rem;
  border: 2px solid #99acc2;   /* outer frame */
}

/* Remove inner borders; keep padding */
table.hostid_table th,
table.hostid_table td {
  border: none !important;     /* no inner grid lines */
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.35;
}

/* Header row (first row) = cyan */
table.hostid_table thead tr {
  background: #9fc5e8;
  color: #000;
  font-weight: 700;
}
table.hostid_table thead th {
  text-align: left;
}

/* Body cells default to white */
table.hostid_table tbody td {
  background: #ffffff;
}

/* “LEGACY Systems” row (3rd overall; 2nd in <tbody>) = grey */
table.hostid_table tbody tr:nth-child(2) td {
  background: #cccccc;
  font-weight: 700;
}

/* First column labels bold for readability */
table.hostid_table tbody td:first-child {
  font-weight: 700;
}

/* Links in tables */
table.hostid_table a {
  color: #268ece;
  text-decoration: none;
}
table.hostid_table a:hover,
table.hostid_table a:focus {
  text-decoration: underline;
}

/* Slightly tighter on small screens */
@media (max-width: 900px) {
  table.hostid_table th,
  table.hostid_table td {
    padding: 6px 8px;
    font-size: 0.9rem;
  }
}
/* NX tables — give them a stable, clean layout */
.rst-content table.nx-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}
.rst-content table.nx-table th,
.rst-content table.nx-table td {
  border: 1px solid #99acc2;
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.35;
}
.rst-content table.nx-table thead th {
  background: #104267;
  color: #fff;
  font-weight: 700;
  text-align: left;
}
.rst-content table.nx-table tbody td { background: #fff; }
.rst-content table.nx-table a { color: #268ece; text-decoration: none; }
.rst-content table.nx-table a:hover,
.rst-content table.nx-table a:focus { text-decoration: underline; }
/* ===== Ford page (scoped) ===== */
/* ===== FORCE THE TWO-COLUMN GRID ===== */
.rst-content .ford-page .ford-two-col{
  /* win against theme container rules */
  display: grid !important;
  grid-template-columns: 1fr;               /* mobile */
  gap: 2rem;
  width: 100%;
  margin: 0 auto 2rem;
  padding: 2rem 1rem;
  align-items: center;
}
.ford-two-col{
  /* win against theme container rules */
  display: grid !important;
  grid-template-columns: 1fr;               /* mobile */
  gap: 2rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
  align-items: center;
}
@media (min-width: 900px){
  .rst-content .ford-page .ford-two-col{
    /* prevent overflow from wide tables/images */
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  }
  .ford-two-col{
    /* prevent overflow from wide tables/images */
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  }
}

/* If theme floats/clears “container” blocks, kill that inside our grid */
.rst-content .ford-page .ford-two-col > .docutils.container{
  float: none !important;
  clear: none !important;
  margin: 0; /* avoid extra gaps that look like stacking */
}

/* Support “reverse” layout (image right on desktop) */
.ford-two-col.reverse > .ford-text  { order: 2; }
.ford-two-col.reverse > .ford-media { order: 1; }

/* Make grid children able to shrink (fixes long URLs/large tables) */
.ford-two-col > * { min-width: 0; }
section#production-software {
  background: #e8f3f9;
  padding: 0 1rem;
}
section#software-download {
  background: #e8f3f9;
  margin-bottom: 1rem;
  padding: 0 1rem;
}
/* ===== MEDIA COLUMN ===== */
.ford-media .card{
  background:#fff; border:1px solid #99acc2; border-radius:.5rem;
  box-shadow:0 2px 6px rgba(0,0,0,.06); overflow:hidden; height:100%;
}
.ford-media img,
.ford-media video,
.ford-media iframe{
  display:block; width:100%; height:auto; border-radius:.5rem;
}

/* ===== TABLES: SAME WIDTH AS IMAGE COLUMN ===== */
/* RTD wraps tables in .wy-table-responsive → make wrapper fill the grid cell */
.ford-two-col .wy-table-responsive{
  width: 100% !important;
  max-width: 100%;
  margin: 0;
}

/* Your tables inside the grid should fill their column */
.ford-two-col table,
.rst-content .ford-page table.c3png-table,
.rst-content .ford-page .nx-table{
  width: 100% !important;
  max-width: 100%;
  table-layout: fixed;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

/* Compact skin (optional – keep if you like your current look) */
.rst-content .ford-page table.c3png-table,
.rst-content .ford-page .nx-table{
  border:1px solid #99acc2; background:#fff;
}
.rst-content .ford-page table.c3png-table th,
.rst-content .ford-page table.c3png-table td,
.rst-content .ford-page .nx-table th,
.rst-content .ford-page .nx-table td{
  padding:.5rem .6rem; border:1px solid #99acc2; vertical-align:middle; line-height:1.35;
}
.rst-content .ford-page table.c3png-table thead th,
.rst-content .ford-page table.c3png-table tr:first-child td{
  background:#104267; color:#fff; font-weight:700; text-align:left;
}

/* ===== FIRST TWO SECTIONS TINT ===== */
.ford-two-col-tint{ background:#e8f3f9; border-radius:.75rem; }
.ford-hero-title.rubric{
  font-size: 2.5rem !important;
  color:white !important;
  background:rgba(255, 255, 255, 1);
}
/* ===== HERO (unchanged, but keep it last to win on specificity) ===== */
.rst-content .ford-page .ford-hero{
  position:relative; isolation:isolate; padding:6rem 1rem; margin:1rem 0 2rem;
  color:white !important; border-radius:.75rem; overflow:hidden;
  background:#000 center/cover no-repeat;
  background-image:url("https://www.theorem.com/hs-fs/hubfs/Ford-Hero.jpg");
}
.rst-content .ford-page .ford-hero::before{
  content:""; position:absolute; inset:0; background:rgba(0,0,0,.45);
  z-index:0; pointer-events:none;
}
.rst-content .ford-page .ford-hero__inner{ position:relative; z-index:1; max-width:750px; margin:0 auto; text-align:center; }
.rst-content .ford-page .button-row{ margin-top:1rem; display:flex; justify-content:left; flex-wrap:wrap; gap:.5rem; }
.rst-content .ford-page .button-row a{
  position:relative; z-index:2;
  display:inline-block; padding:.65rem 1rem; border-radius:.5rem;
  text-decoration:none; background:#fff; color:#104267;
  border:1px solid rgba(16,66,103,.2); font-weight:600;
}
