/* Graphite changes the night palette. The existing page layout and brand motifs stay in the base styles. */
html[theme="dark"][data-tc-style="graphite"] .textcad-community {
  --r2-page: #111716;
  --r2-deep: #0c1212;
  --r2-panel: #182120;
  --r2-raised: #24312e;
  --r2-ink: #edf3ef;
  --r2-muted: #b0c1ba;
  --r2-rule: #435550;
  --r2-edge: #748b82;
  --r2-link: #83e9ab;
  --r2-focus: #ff9d76;
  background-color: var(--r2-page);
  color: var(--r2-ink);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community :is(.site-header,.mobile-menu,.tc-section-dark) {
  background-color: var(--r2-deep);
  color: var(--r2-ink);
  border-color: var(--r2-rule);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community :is(.tc-hero,.tc-page-hero,.tc-section-paper,.tc-reference-layout) {
  background-color: var(--r2-page);
  color: var(--r2-ink);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community :is(#workflow,.tc-section-peach) {
  background-color: var(--r2-raised);
  color: var(--r2-ink);
  border-color: var(--r2-rule);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero-grid > div:first-child {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero::after {
  -webkit-text-stroke-color: #8ba89a29;
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero .tc-emblem-ring {
  border-color: var(--r2-edge);
}
html.tc-turbo[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero {
  background-blend-mode: soft-light;
}
html.tc-turbo[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero .tc-emblem-ring {
  background: #1f392c;
  border-color: var(--r2-link);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community :is(.tc-hero .tc-lead,.tc-hero-note,.tc-turbo-caption,#workflow .tc-step p) {
  color: var(--r2-muted);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .site-header .tc-theme-switch {
  background: var(--r2-panel);
  border-color: var(--r2-edge);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .site-header .tc-theme-switch .tc-theme-button {
  color: var(--r2-ink) !important;
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .site-header .tc-theme-switch .tc-theme-button[aria-pressed="true"] {
  background: var(--r2-link) !important;
  color: #130d0c !important;
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community #workflow .tc-steps {
  border-color: var(--r2-rule);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community #workflow .tc-step {
  background: var(--r2-panel);
  border-color: var(--r2-rule);
  color: var(--r2-ink);
  box-shadow: none;
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community #engineering-cases .tc-coming-card {
  background: var(--r2-panel);
  color: var(--r2-ink);
  border-color: var(--r2-rule);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community #engineering-cases .tc-coming-image {
  background: var(--r2-deep);
  border-color: var(--r2-rule);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-price-table {
  background: var(--r2-panel);
  border: 1px solid var(--r2-edge);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-price-row {
  background: var(--r2-panel);
  color: var(--r2-ink);
  border-color: var(--r2-edge);
  grid-template-columns: minmax(0,1fr) minmax(0,1.2fr);
  overflow-wrap: anywhere;
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-price-row:first-child {
  background: var(--r2-raised);
  color: var(--r2-ink);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-price-row:last-child {
  background: #193026;
  color: var(--r2-ink);
}
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-price-row:last-child b { color: var(--r2-link); }
html[theme="dark"][data-tc-style="graphite"] .textcad-community :is(.tc-theme-button,.tc-style-switch button,main a,main button):focus-visible {
  outline-color: var(--r2-focus);
}

.tc-r2-picture { display: contents; }
.tc-r2-picture > .tc-r2-image-dark { display: none !important; }
html[theme="dark"] .tc-r2-picture > .tc-r2-image-dark { display: block !important; }
html[theme="dark"] .tc-r2-picture > .tc-r2-image-light { display: none !important; }

.textcad-community .tc-style-switch {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 20px;
  padding: 2px;
  color: inherit;
  flex: 0 0 auto;
  white-space: nowrap;
}
.textcad-community .tc-style-switch button {
  border: 0;
  border-radius: 18px;
  box-shadow: none;
  padding: 6px 8px;
  background: transparent;
  color: inherit;
  min-height: 30px;
  font: 800 11px/1.3 Manrope, sans-serif;
  cursor: pointer;
}
.textcad-community .tc-style-switch button[aria-pressed="true"] {
  background: #10b742;
  color: #130d0c;
}
.textcad-community .tc-style-switch button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  .textcad-community .tc-style-switch { grid-column: 1 / -1; grid-row: 3; justify-self: end; }
  .textcad-community .tc-style-switch button { min-height: 36px; }
}
@media print {
  .textcad-community .tc-style-switch { display: none; }
  html[theme] .tc-r2-picture > .tc-r2-image-dark { display: none !important; }
  html[theme] .tc-r2-picture > .tc-r2-image-light { display: block !important; }
}

/* Keep the Classic mascot at full size. In Turbo the pattern comes through on the mascot side. */
html[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero .tc-emblem-ring {
  border-color: #67a285;
  box-shadow: 0 0 0 5px rgb(16 183 66 / 8%), 0 0 34px rgb(16 183 66 / 21%);
}
html.tc-turbo[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero {
  background-blend-mode: normal;
}
html.tc-turbo[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--r2-page) 34%, rgb(17 23 22 / 95%) 50%,
    rgb(17 23 22 / 39%) 76%, rgb(17 23 22 / 56%) 100%);
}
html.tc-turbo[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero .tc-emblem-ring {
  background: var(--tc-green);
  border-color: var(--tc-ink);
  box-shadow: 0 0 0 6px rgb(16 183 66 / 18%), 0 0 36px rgb(16 183 66 / 36%);
}
@media (max-width: 760px) {
  html.tc-turbo[theme="dark"][data-tc-style="graphite"] .textcad-community .tc-hero::before {
    background: linear-gradient(180deg, var(--r2-page) 45%, rgb(17 23 22 / 95%) 58%,
      rgb(17 23 22 / 40%) 77%, rgb(17 23 22 / 62%) 100%);
  }
}
