:root {
      --bg: #fdfdfb;
      --ink: #151617;
      --ink-soft: #686868;
      --accent: #0a7b63;
      --accent-soft: #b3dacd;
      --border-soft: #e3e0d7;
      --chip-bg: rgba(10, 123, 99, 0.04);
    }

    /* Dark mode */
    html.dark {
      --bg: #121416;
      --ink: #e8e6e3;
      --ink-soft: #9a9a9a;
      --accent: #4fc3a1;
      --accent-soft: #1f4a3d;
      --border-soft: #2a2d31;
      --chip-bg: rgba(79, 195, 161, 0.08);
    }

    * {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      padding: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: "Cascadia Code", ui-monospace, SFMono-Regular, Menlo,
        Monaco, "Roboto Mono", monospace;
      text-rendering: geometricPrecision;
      -webkit-font-smoothing: antialiased;
    }

    a {
      color: #1a5fb4;
    }

    html.dark a {
      color: #ffffff;
    }

    body {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      padding: 74px 0 32px;
      line-height: 1.5em;
    }

    .page {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .page-shell {
      width: 100%;
      max-width: 960px;
      margin: 0 auto;
      padding: 12px 24px 52px;
      display: flex;
      flex-direction: column;
      flex: 1;
      gap: 28px;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Top System Bar */

    .system-bar {
      padding-bottom: 18px;
      font-size: 16px;
      font-weight: 600;
      text-transform: lowercase;
      letter-spacing: 0.08em;
    }

    .brand-home-link {
      text-decoration: none;
      color: inherit;
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0;
    }

    .brand-stack {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .brand {
      font-size: 78px;
      letter-spacing: -0.04em;
      font-family: "Bricolage Grotesque", "Cascadia Code", ui-monospace, monospace;
      line-height: 48px;
      font-weight: 800;
      text-transform: none;
      position: relative;
      white-space: nowrap;
      display: inline-block;
      visibility: hidden;
      overflow: visible;
      height: 50px;
      line-height: 50px;
    }

    .brand.is-ready {
      visibility: visible;
    }

    .brand-subtitle {
      font-size: 20px;
      letter-spacing: 0.08em;
      text-transform: none;
      margin-top: 20px;
      color: #949494;
      font-family: "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, monospace;
      min-height: 1.4em;
      display: block;
      text-align: left;
    }

    .brand-letters {
      display: inline-flex;
      position: relative;
      align-items: flex-end;
      gap: 0;
    }

    .brand-letter {
      display: inline-block;
      opacity: 0;
      transform: translateX(0);
      will-change: transform, opacity;
      overflow: visible;
    }

    .brand-letter-space {
      opacity: 1 !important;
      transform: none !important;
      display: inline-block;
    }

    /* Main content */

    .main {
      flex: 1;
      padding: 0;
      position: relative;
      z-index: 1;
    }

    /* subtle background grid */

    .background-grid {
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0.22;
      background-image:
        radial-gradient(circle at 20% 0%, rgba(0,0,0,0.02) 0, transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(0,0,0,0.02) 0, transparent 55%),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0,0,0,0.03) 1px, transparent 1px);
      background-size:
        100% 100%,
        100% 100%,
        80px 80px,
        80px 80px;
      mask-image: radial-gradient(circle at 50% 20%, black 0, transparent 65%);
    }

    /* Sections */

    .section {
      position: relative;
      display: grid;
      grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
      gap: 32px;
      padding: 28px 0;
      border-bottom: 1px solid var(--border-soft);
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 0.5s ease-out, transform 0.5s ease-out;
      z-index: 1;
    }

    #section-overview {
      padding-top: 0;
    }

    .section.section-legal .section-label {
      padding-top: 0;
    }

    .legal-copy > *:first-child {
      margin-top: 0;
    }

    .section.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .section:last-of-type {
      border-bottom: none;
    }

    .section-label {
      font-size: 16px;
      color: var(--ink-soft);
      text-transform: lowercase;
      letter-spacing: 0.05em;
      display: flex;
      align-items: flex-start;
      white-space: nowrap;
      padding-top: 2px;
    }

    .section-label--has-video {
      padding-top: 0;
      align-items: flex-start;
      justify-content: flex-start;
      isolation: isolate;
    }

    .section-label::before {
      content: "[ ";
    }

    .section-label::after {
      content: " ]";
    }

    .section-label--has-video::before,
    .section-label--has-video::after {
      content: none;
    }

    .service-label-video {
      display: block;
      width: 100%;
      max-width: 180px;
      border: none;
      border-radius: 0;
      background: none;
      box-shadow: none;
      mix-blend-mode: multiply;
      filter: sepia(0.03) saturate(0.8);
      pointer-events: none;
    }

    .service-label-video::-webkit-media-controls {
      display: none !important;
    }

    .section-body {
      position: relative;
      z-index: 1;
    }

    .section-body h3 {
      margin-top: 0;
    }

    /* Overview */

    .overview-intro {
      font-size: 16px;
      line-height: 1.5rem;
      color: var(--ink-soft);
      max-width: 620px;
      margin-bottom: 16px;
    }

    .overview-headline {
      font-size: 16px;
      line-height: 1.5rem;
      margin-bottom: 10px;
    }


    .circuit-overlay {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 0;
      mix-blend-mode: normal;
    }

    .circuit-path {
      fill: none;
      stroke: rgba(102, 102, 102, 0.45);
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      opacity: 0;
      filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.35));
    }

    .circuit-path.subtle {
      stroke: rgba(140, 140, 140, 0.35);
      stroke-width: 1.4;
    }

    .circuit-node {
      fill: rgba(120, 120, 120, 0.7);
      opacity: 0;
      filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.55));
    }

    /* Services matrix */

    .services-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .service-card {
      display: block;
      text-decoration: none;
      color: inherit;
      border: 1px solid var(--border-soft);
      border-radius: 10px;
      padding: 18px 20px;
      background: #ffffff;
      box-shadow: 0 12px 28px rgba(15, 47, 93, 0.12);
      transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
      min-height: 120px;
    }

    .service-card:hover,
    .service-card:focus-visible {
      transform: translateY(-4px);
      box-shadow: 0 20px 40px rgba(10, 35, 70, 0.2);
      outline: none;
    }

    .service-card.is-active {
      box-shadow: 0 24px 46px rgba(10, 35, 70, 0.25);
    }

    .service-card-content {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .service-card h4 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
    }

    .service-card-meta {
      margin: 10px 0 0;
      font-size: 13px;
      line-height: 1.45;
      color: var(--ink-soft);
    }

    .service-fallback {
      font-size: 16px;
      color: var(--ink-soft);
      margin: 0;
    }

    .service-detail {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .service-name {
      font-size: 34px;
      font-weight: 700;
      margin-bottom: 8px;
      line-height: 1em;
    }

    .service-name a {
      color: inherit;
      text-decoration: none;
    }

    .service-name a:hover,
    .service-name a:focus-visible {
      color: var(--accent);
      outline: none;
    }

    .service-list {
      margin: 0;
      padding-left: 20px;
      list-style: disc;
      color: var(--ink);
    }

    .service-list li {
      margin-bottom: 8px;
      color: var(--ink-soft);
    }

    .service-steps {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .service-steps li {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .service-steps li strong {
      font-size: 14px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .service-steps li span {
      color: var(--ink-soft);
    }

    .service-two-col {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 20px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 12px 26px;
      border-radius: 10px;
      background: var(--ink);
      color: #fff;
      text-decoration: none;
      font-weight: 600;
      letter-spacing: 0.08em;
      transition: transform 0.2s ease, background 0.2s ease;
    }

    .btn:hover,
    .btn:focus-visible {
      background: #000;
      transform: translateY(-1px);
    }

    .final-cta .section-body p {
      font-weight: 400 !important;
      color: var(--ink-soft);
    }

    .final-cta .section-body .btn {
      margin-top: 15px;
    }

    .legal-copy h2 {
      font-size: 15px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin: 24px 0 8px;
    }

    .legal-copy p {
      margin: 0 0 12px;
      color: var(--ink-soft);
    }

    .contact-intro {
      margin-bottom: 16px;
    }

    .contact-intro h3 {
      margin: 0 0 12px;
    }

    .contact-intro p {
      margin: 0 0 12px;
      color: var(--ink-soft);
    }

    .microcopy {
      font-size: 13px;
      color: var(--ink-soft);
      margin: 0;
    }

    .contact-note {
      margin-top: 16px;
    }

    .contact-form-wrapper {
      margin-top: 24px;
      border: 1px solid var(--border-soft);
      border-radius: 12px;
      padding: 24px;
      background: #fff;
      box-shadow: 0 12px 28px rgba(15, 47, 93, 0.08);
    }

    .contact-form {
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .contact-form label {
      font-size: 13px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink);
      margin-bottom: 6px;
      display: block;
    }

    .contact-form input,
    .contact-form textarea {
      width: 100%;
      border: 1px solid var(--border-soft);
      border-radius: 8px;
      padding: 12px 14px;
      font-family: "Cascadia Code", ui-monospace, monospace;
      font-size: 15px;
      background: #faf8f2;
      color: var(--ink);
    }

    .contact-form textarea {
      min-height: 160px;
      resize: vertical;
    }

    .form-field {
      display: flex;
      flex-direction: column;
    }

    .form-error {
      font-size: 13px;
      color: #8c1f2a;
      margin-top: 6px;
    }

    .contact-form input.has-error,
    .contact-form textarea.has-error {
      border-color: rgba(200, 40, 50, 0.8);
      background: #fff8f8;
    }

    .form-actions {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
    }

    .form-status {
      border-radius: 10px;
      padding: 12px 18px;
      font-size: 14px;
      margin-bottom: 16px;
    }

    .form-status-success {
      background: rgba(10, 123, 99, 0.08);
      color: #0a7b63;
      border: 1px solid rgba(10, 123, 99, 0.2);
    }

    .form-status-error {
      background: rgba(200, 40, 50, 0.08);
      color: #8c1f2a;
      border: 1px solid rgba(200, 40, 50, 0.2);
    }

    .honeypot-field {
      position: absolute;
      left: -10000px;
      width: 1px;
      height: 1px;
      overflow: hidden;
    }

    .site-footer {
      font-size: 14px;
      color: var(--ink-soft);
      padding-top: 32px;
    }

    .site-footer-links {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      margin-top: 6px;
    }

    .site-footer-links .footer-link {
      white-space: nowrap;
    }

    .site-footer-links a {
      color: inherit;
      text-decoration: none;
    }

    .site-footer-links a:hover,
    .site-footer-links a:focus {
      text-decoration: underline;
    }

    .site-footer-theme {
      margin-top: 12px;
    }

    /* Responsive */

    @media (max-width: 800px) {
      body {
        padding: 12px 0 24px;
      }

      .page-shell {
        padding: 12px 16px 40px;
        gap: 24px;
      }

      .system-bar {
        padding-bottom: 16px;
        margin-top: 20px;
      }

      .section {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      body[data-page="service"] .service-hero {
        padding-top: 0;
      }

      body[data-page="service"] .service-label-video {
        max-width: 90vw;
        margin: 0 auto;
        aspect-ratio: 1 / 1;
        height: auto;
        object-fit: cover;
      }

      .services-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .service-card {
        transition: border-color 0.2s ease;
      }
    }

    /* Dark mode overrides for hardcoded colors */
    html.dark .service-card {
      background: #1a1d20;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    }

    html.dark .service-card:hover,
    html.dark .service-card:focus-visible {
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    html.dark .contact-form-wrapper {
      background: #1a1d20;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    }

    html.dark .contact-form input,
    html.dark .contact-form textarea {
      background: #1e2124;
    }

    html.dark .background-grid {
      background-image:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,0.02) 0, transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(255,255,255,0.02) 0, transparent 55%),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    }

    html.dark .circuit-path {
      stroke: rgba(180, 180, 180, 0.45);
    }

    html.dark .circuit-node {
      fill: rgba(200, 200, 200, 0.7);
    }

    html.dark .service-label-video {
      mix-blend-mode: screen;
      filter: invert(0.93) !important;
    }

    html.dark .btn {
      background: #e8e6e3;
      color: #121416;
    }

    html.dark .btn:hover,
    html.dark .btn:focus-visible {
      background: #fff;
    }

    /* Theme toggle link */
    .theme-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--ink-soft);
      text-decoration: none;
      cursor: pointer;
    }

    .theme-toggle:hover {
      text-decoration: underline;
    }

    .theme-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .theme-toggle svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    /* Light mode: show sun */
    .theme-toggle .icon-sun {
      display: inline;
    }

    .theme-toggle .icon-moon {
      display: none;
    }

    /* Dark mode: show moon */
    html.dark .theme-toggle .icon-sun {
      display: none;
    }

    html.dark .theme-toggle .icon-moon {
      display: inline;
    }
