      /* -------------------- GLOBAL -------------------- */

      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }

      #chat-header {
        background: #0e0e10;
        color: white;
        padding: 12px;
        font-weight: 600;
      }

      #chat-body {
        height: 260px;
        overflow-y: auto;
        padding: 10px;
      }

      #chat-input {
        width: 100%;
        border: none;
        border-top: 1px solid #ccc;
        padding: 10px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: #f6f6f8;
        color: #2f2f35;
        line-height: 1.6;
      }

      img {
        max-width: 100%;
      }

      .container {
        width: 90%;
        max-width: 1200px;
        margin: auto;
      }

      /* -------------------- NAVIGATION -------------------- */

      header {
        background: #0e0e10;
        position: sticky;
        top: 0;
        z-index: 1000;
      }

      .nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 0;
        position: relative;
      }

      .logo {
        display: flex;
        align-items: center;
        gap: 10px;
        color: white;
        font-weight: 600;
      }

      .logo img {
        height: 40px;
      }

      nav ul {
        display: flex;
        list-style: none;
      }

      nav li {
        margin-left: 30px;
      }

      nav a {
        color: white;
        text-decoration: none;
        font-weight: 500;
      }

      nav a:hover {
        color: #9e8fae;
      }

      .nav-toggle {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
      }

      .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: white;
      }

      /* -------------------- HERO -------------------- */

      .hero {
        background: linear-gradient(135deg, #0e0e10, #2f2f35, #9e8fae);
        color: white;
        padding: 76px 0 84px;
        text-align: center;
        border-bottom-left-radius: 48px;
        border-bottom-right-radius: 48px;
      }

      .hero-kicker {
        color: #77d9c0;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
      }

      .hero h1 {
        margin-top: 12px;
        font-size: 52px;
        font-weight: 600;
      }

      .hero p {
        max-width: 680px;
        margin: 16px auto 0;
        font-size: 19px;
        opacity: 0.9;
      }

      .hero-buttons {
        margin-top: 28px;
      }

      /* Trust strip — short, concrete credibility signals shown before a
         visitor even reaches the tool, aimed specifically at the "looks
         confident, might be wrong" skepticism a controls engineer brings
         to any AI-generated engineering output. */
      .trust-strip {
        margin-top: 26px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 14px;
      }

      .trust-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 13.5px;
        font-weight: 500;
      }

      .btn {
        display: inline-block;
        padding: 14px 30px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 600;
        margin: 10px;
      }

      .btn-primary {
        background: white;
        color: #0e0e10;
      }

      .btn-secondary {
        border: 2px solid white;
        color: white;
      }

      /* -------------------- SECTIONS -------------------- */

      section {
        padding: 90px 0;
      }

      .section-title {
        font-size: 36px;
        margin-bottom: 20px;
        font-weight: 600;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        line-height: 1.2;
      }

      .section-sub {
        color: #666;
        margin-bottom: 40px;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        line-height: 1.6;
      }

      /* -------------------- WORKFLOW STEPS -------------------- */
      .step-badge {
        display: inline-block;
        background: #0e0e10;
        color: white;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.05em;
        padding: 6px 14px;
        border-radius: 100px;
        margin-bottom: 16px;
      }

      /* Distinguishes standalone/optional tools from the numbered design workflow */
      .step-badge-optional {
        background: #9e8fae;
      }

      .workflow-intro {
        background: #f6f6f8;
        border: 1px solid #e0e0e6;
        border-radius: 10px;
        padding: 24px 30px;
        margin-bottom: 20px;
      }

      .workflow-intro h3 {
        margin-bottom: 10px;
        font-size: 20px;
      }

      .workflow-intro p {
        color: #555;
      }

      .workflow-intro ol {
        margin: 14px 0 0 20px;
        color: #555;
      }

      .workflow-intro li {
        margin-bottom: 6px;
      }

      .pricelist-tip {
        margin: 18px 0 0;
        padding: 16px 20px;
        background: #fff;
        border: 1px solid #e0e0e6;
        border-radius: 8px;
        color: #555;
      }

      .pricelist-tip h4 {
        margin: 0 0 8px;
        color: #0e0e10;
      }

      .pricelist-tip p {
        margin: 0 0 8px;
      }

      .pricelist-tip p:last-child {
        margin-bottom: 0;
      }

      .auth-explainer {
        margin: 18px 0 14px;
        padding: 16px 20px;
        background: #fff;
        border: 1px solid #e0e0e6;
        border-left: 4px solid #0e8a5f;
        border-radius: 8px;
        color: #555;
      }

      .auth-explainer h4 {
        margin: 0 0 8px;
        color: #0e0e10;
      }

      .auth-explainer p {
        margin: 0 0 8px;
      }

      .auth-explainer ul {
        margin: 0 0 10px 20px;
      }

      .auth-explainer li {
        margin-bottom: 4px;
      }

      .auth-explainer-demo {
        padding: 10px 12px;
        background: #eefaf0;
        border-radius: 6px;
      }

      .btn-link {
        background: none;
        border: none;
        padding: 0;
        color: #0e8a5f;
        font: inherit;
        font-weight: 600;
        text-decoration: underline;
        cursor: pointer;
      }

      .signin-required-note {
        margin: 10px 0;
        padding: 10px 14px;
        background: #fff8e6;
        border: 1px solid #f3d38a;
        border-radius: 6px;
        color: #6b4e00;
      }

      .demo-notice-actions {
        margin-top: 10px;
      }

      .auth-explainer-privacy {
        font-size: 13px;
      }

      .auth-explainer-privacy a {
        color: #0e8a5f;
      }

      .save-progress-row {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-top: 18px;
        padding-top: 18px;
        border-top: 1px solid #e0e0e6;
      }

      .save-progress-row button {
        flex-shrink: 0;
      }

      #saveProgressResult {
        font-size: 14px;
        color: #333;
      }

      #saveProgressResult input {
        width: 100%;
        max-width: 360px;
        padding: 8px 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 13px;
      }

      #drawingSaveResult input {
        width: 100%;
        max-width: 360px;
        padding: 8px 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 13px;
      }

      .restore-notice {
        border-radius: 8px;
        padding: 14px 18px;
        margin-bottom: 20px;
        font-size: 14px;
      }

      .restore-notice.success {
        background: #eefaf0;
        border: 1px solid #b7e4c0;
        color: #1e5e2e;
      }

      .restore-notice.error {
        background: #fdf1f1;
        border: 1px solid #f0bcbc;
        color: #7a2323;
      }

      .grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 30px;
      }

      /* -------------------- CARDS -------------------- */

      .card {
        background: white;
        padding: 35px;
        border-radius: 10px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
        transition: transform 0.2s;
      }

      .card:hover {
        transform: translateY(-5px);
      }

      .card h3 {
        margin-bottom: 10px;
      }

      /* -------------------- DARK SECTION -------------------- */

      .dark {
        background: #0e0e10;
        color: #ffffff;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
      }

      .dark p {
        color: #e0e0e0;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
      }
      
      /* Fix text contrast and rendering in dark sections */
      .dark .section-title {
        color: #ffffff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        font-weight: 600;
      }
      
      .dark .section-sub {
        color: #e0e0e0;
      }
      
      .dark .card {
        background: #1a1a1c;
        color: #ffffff;
      }
      
      .dark .card h3 {
        color: #ffffff;
        font-weight: 600;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
      }
      
      .dark .card p {
        color: #d0d0d0;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
      }

      /* -------------------- PRICING -------------------- */

      /* -------------------- PROOF -------------------- */

      .proof-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;
        align-items: flex-start;
        justify-content: center;
      }

      .proof-panel {
        flex: 1 1 320px;
        max-width: 420px;
        text-align: center;
      }

      .proof-panel img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        border: 1px solid #e5e5e5;
      }

      .proof-label {
        font-weight: 700;
        margin-bottom: 10px;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #666;
      }

      .proof-arrow {
        align-self: center;
        font-size: 32px;
        color: #ccc;
        margin-top: 140px;
      }

      .proof-caption {
        margin-top: 12px;
        font-size: 13px;
        color: #b45309;
        background: #fef3e2;
        padding: 8px 12px;
        border-radius: 8px;
        text-align: left;
      }

      .proof-report-cta {
        text-align: center;
        margin-top: 34px;
      }

      .proof-report-cta p {
        font-size: 14px;
        color: #666;
        margin-bottom: 14px;
      }

      .proof-report-cta .btn-report {
        display: inline-block;
        padding: 14px 30px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 600;
        background: #0e0e10;
        color: white;
        border: 2px solid #0e0e10;
      }

      .proof-report-cta .btn-report:hover {
        background: #2a2a2e;
      }

      @media (max-width: 700px) {
        .proof-arrow {
          display: none;
        }
      }

      .pricing-grid {
        max-width: 1100px;
        margin: 0 auto;
      }

      .card-coming-soon {
        opacity: 0.85;
      }

      .card-featured {
        border: 2px solid var(--robo-primary);
        position: relative;
      }

      .pricing-badge {
        position: absolute;
        top: -14px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--robo-primary);
        color: white;
        font-size: 12px;
        font-weight: 700;
        padding: 4px 14px;
        border-radius: 14px;
        letter-spacing: 0.03em;
      }

      .pricing-price {
        font-size: 40px;
        font-weight: 700;
        margin: 10px 0 20px;
      }

      .pricing-price span {
        font-size: 16px;
        font-weight: 400;
        color: #666;
      }

      .pricing-features {
        list-style: none;
        padding: 0;
        margin: 0 0 24px;
        text-align: left;
      }

      .pricing-features li {
        padding: 6px 0 6px 26px;
        position: relative;
      }

      .pricing-features li::before {
        content: "✓";
        position: absolute;
        left: 0;
        color: var(--robo-primary);
        font-weight: 700;
      }

      .pricing-footnote {
        text-align: center;
        margin-top: 24px;
        color: #888;
        font-size: 13px;
      }

      .pricing-current-plan {
        text-align: center;
        margin-bottom: 24px;
        font-size: 14px;
        color: #2e7d32;
        font-weight: 600;
      }

      /* -------------------- INDUSTRIES -------------------- */

      .industry {
        padding: 40px;
        border-radius: 10px;
        background: white;
        text-align: center;
        font-weight: 500;
        position: relative;
        overflow: hidden;
        color: #2f2f35;
        transition: transform 0.3s, box-shadow 0.3s;
        cursor: pointer;
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .industry:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
      }

      /* Industry-specific backgrounds */
      .industry-powerplant {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1581092160562-40aa08e78837?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      .industry-districtheating {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1559302504-64aae6ca6b6d?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      .industry-manufacturing {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1565043666747-69f6646db940?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      .industry-smartbuildings {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      .industry-energyinfrastructure {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      .industry-datacenters {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1563986768609-322da13575f3?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      .industry-pulppaper {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://images.unsplash.com/photo-1586953208448-b95a79798f07?w=800') no-repeat center center;
        background-size: cover;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
      }

      /* -------------------- CASE STUDIES -------------------- */

      .case {
        background: white;
        padding: 40px;
        border-radius: 10px;
      }

      .case h3 {
        margin-bottom: 10px;
      }


      /* -------------------- Energy Savings Calculator -------------------- */
      .calculator-box {
        max-width: 500px;
        background: white;
        padding: 40px;
        border-radius: 10px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
        overflow: hidden;
      }

      .calculator-box label {
        display: block;
        margin-top: 15px;
        font-weight: 500;
      }

      .calculator-box input:not([type="checkbox"]) {
        width: 100%;
        padding: 12px;
        margin-top: 5px;
        border-radius: 6px;
        border: 1px solid #ccc;
      }

      /* Checkboxes were inheriting the text-input rule above (100% width,
         12px padding, a border) instead of being small squares — each one
         ended up a different giant size depending on its flex row's
         content, which is why they looked like they were "walking"
         diagonally down the page instead of sitting in a clean column. */
      .calculator-box input[type="checkbox"] {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        margin: 0;
        padding: 0;
      }

      .industry-hints {
        margin: 8px 0 4px;
        padding: 10px 14px;
        background: #fff7ed;
        border: 1px solid #fed7aa;
        border-radius: 8px;
        font-size: 0.85rem;
        color: #7c2d12;
        line-height: 1.5;
      }
      .industry-hints strong {
        color: #c2410c;
      }

      #result {
        margin-top: 25px;
        font-size: 20px;
        font-weight: 600;
        color: #0e0e10;
      }

      #result,
      #automationResult {
        margin-top: 20px;
        background: #f4f4f8;
        padding: 20px;
        border-radius: 10px;
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-wrap: break-word;
      }

      #result pre,
      #automationResult pre {
        white-space: pre-wrap;
        font-family: inherit;
      }

      /* -------------------- CONTACT -------------------- */

      .contact-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
      }

      .contact-grid input,
      .contact-grid textarea {
        width: 100%;
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-family: "Inter";
      }

      button {
        padding: 14px 28px;
        background: #0e0e10;
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        cursor: pointer;
      }

      button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }

      .spinner {
        display: inline-block;
        width: 14px;
        height: 14px;
        border: 2px solid #ccc;
        border-top-color: #0e0e10;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        vertical-align: middle;
        margin-right: 6px;
      }

      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }

      @media (prefers-reduced-motion: reduce) {
        .spinner {
          animation: none;
        }
      }

      /* -------------------- REPORT CTA -------------------- */
      /* Deliberately distinct from the generic black buttons above — this is
         the payoff of the whole 3-step flow, not just another tool action,
         so it needs to read as such rather than blend in at the bottom of
         Step 3's box. */

      .report-cta {
        margin-top: 28px;
        padding-top: 24px;
        border-top: 1px dashed #ccc;
        text-align: center;
      }

      .report-cta p {
        margin: 0 0 14px;
        color: #444;
        font-size: 15px;
      }

      #btnGenerateReport {
        background: linear-gradient(135deg, #0e8a5f, #0c6b48);
        padding: 16px 36px;
        font-size: 16px;
        box-shadow: 0 4px 14px rgba(14, 138, 95, 0.35);
        width: 100%;
        max-width: 420px;
      }

      #btnGenerateReport:hover {
        background: linear-gradient(135deg, #0fa26e, #0e8a5f);
      }

      /* -------------------- FOOTER -------------------- */

      footer {
        background: #0e0e10;
        color: white;
        padding: 60px 0;
        margin-top: 60px;
      }

      .footer-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 40px;
      }

      footer a {
        color: #ddd;
        text-decoration: none;
        display: block;
        margin-top: 8px;
      }

      .footer-bottom {
        margin-top: 40px;
        padding-top: 24px;
        border-top: 1px solid #2a2a2e;
        font-size: 13px;
        color: #999;
        text-align: center;
      }

      footer a:hover {
        color: white;
      }

      #networkResult {
        background: white;
        border-radius: 10px;
        padding: 10px;
        height: 400px;
      }

      /* Bigger topologies render wider than the 1100px form column above —
         instead of shrinking everything to fit (illegible icons/labels on
         large systems), the diagram is allowed to grow past its container
         and this wrapper scrolls horizontally to reach the rest. */
      #networkScrollWrap {
        margin-top: 20px;
        overflow-x: auto;
      }

      #drawingNetworkResult {
        background: white;
        border-radius: 10px;
        padding: 10px;
        height: 500px;
      }

      #drawingNetworkScrollWrap {
        margin-top: 20px;
        overflow-x: auto;
      }

      /* Extracted-drawing diagrams use force-directed layout, which spreads
         nodes out organically rather than into the tall/narrow shape
         generateNetwork()'s hierarchical diagrams take — a wider column
         gives that layout more room, same reasoning as #network-ai below. */
      #drawing-ai .calculator-box {
        max-width: 1100px;
      }

      .network-toolbar {
        display: none;
        gap: 8px;
        margin-top: 12px;
        margin-bottom: -8px;
      }
      .network-toolbar button {
        width: auto;
        padding: 6px 14px;
        font-size: 0.9rem;
      }
      .network-scroll-hint {
        font-size: 12px;
        color: #888;
        margin: 4px 0 0;
      }

      /* Node detail panel — plain in-flow box, not an overlay/modal, so it
         can't visually conflict with anything else on the page. Shown below
         the diagram when a node is clicked. */
      .node-detail-panel {
        margin-top: 16px;
        padding: 16px 20px;
        background: #f7f9fb;
        border: 1px solid #dde3ea;
        border-radius: 10px;
      }
      .node-detail-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .node-detail-header h3 {
        margin: 0;
        font-size: 1.05rem;
      }
      .node-detail-close {
        width: auto;
        padding: 2px 10px;
        font-size: 0.9rem;
        background: transparent;
        color: #666;
        border: 1px solid #ccc;
      }
      .node-detail-kind {
        font-size: 0.8rem;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin: 2px 0 10px;
      }
      .node-detail-fields {
        display: grid;
        grid-template-columns: max-content 1fr;
        gap: 6px 16px;
        margin: 0;
      }
      .node-detail-fields dt {
        color: #666;
        font-weight: 600;
      }
      .node-detail-fields dd {
        margin: 0;
      }
      .node-detail-points-list {
        margin: 0;
        padding-left: 18px;
      }
      .node-detail-live {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px dashed #dde3ea;
      }
      .node-detail-live h4 {
        margin: 0 0 8px;
        font-size: 0.8rem;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.04em;
      }
      .node-detail-live table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.88rem;
      }
      .node-detail-live td {
        padding: 3px 6px 3px 0;
      }
      .node-detail-live td.live-value {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .node-detail-live tr.live-alarm td.live-value {
        color: #c62828;
        font-weight: 600;
      }

      .twin-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        color: #666;
        margin-left: 4px;
      }
      .twin-status .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #bbb;
        display: inline-block;
      }
      .twin-status[data-state="connecting"] .dot { background: #FFC107; }
      .twin-status[data-state="live"] .dot { background: #4CAF50; }
      .twin-status[data-state="error"] .dot,
      .twin-status[data-state="disconnected"] .dot { background: #F44336; }

      /* Network topology diagrams are wide/landscape by nature (bus bars,
         parallel controller columns) — give them more room than the other
         narrow single-column forms in .calculator-box. */
      #network-ai .calculator-box {
        max-width: 1100px;
      }

      /* The I/O table has 9 columns (Tag, Type, Address, Description,
         Signal Range, Unit, Safety Class, Node/Cabinet, Module/Channel) —
         the default 500px form width left almost all of it hidden behind
         the horizontal scrollbar. Wider still doesn't guarantee every
         column fits on smaller screens, so the scroll wrapper/hint stays
         as a fallback, but most desktop widths now show the whole table. */
      #io-ai .calculator-box {
        max-width: 1300px;
      }

      /* -------------------- MOBILE -------------------- */

      @media (max-width: 800px) {
        .hero h1 {
          font-size: 38px;
        }

        /* Keep the hero compact on short mobile viewports — the fixed
           "Tour with RoboJarkko" button (bottom-right, position: fixed)
           can otherwise overlap the last trust badge at initial scroll. */
        .trust-strip {
          margin-top: 18px;
          gap: 8px 10px;
        }

        .trust-badge {
          padding: 6px 12px;
          font-size: 12.5px;
        }

        .node-detail-fields {
          grid-template-columns: 1fr;
        }

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

        .nav-toggle {
          display: flex;
        }

        nav ul {
          display: none;
          position: absolute;
          top: 100%;
          left: 0;
          right: 0;
          background: #0e0e10;
          flex-direction: column;
          padding: 20px;
          z-index: 1001;
        }

        nav ul.nav-open {
          display: flex;
        }

        nav li {
          margin-left: 0;
          margin-bottom: 15px;
        }

        nav li:last-child {
          margin-bottom: 0;
        }
      }

      #ioResult {
        margin-top: 20px;
        padding: 0;
        /* 🔥 remove inner padding */
        background: transparent;
        /* 🔥 remove grey box */
      }

      #ioResult table {
        width: 100%;
        min-width: 780px;
        border-collapse: collapse;
        margin-top: 10px;
        background: white;
        /* table itself is clean */
      }

      #ioResult th,
      #ioResult td {
        border: 1px solid #ccc;
        padding: 10px;
        text-align: left;
      }

      #ioResult th {
        background: #eaeaf0;
      }

      #ioResult tr:nth-child(even) {
        background: #fafafa;
      }

      .io-summary {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
      }

      #drawingReview {
        margin-top: 20px;
      }

      #drawingReview h3 {
        margin: 20px 0 8px;
      }

      #drawingReview table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
        background: white;
      }

      #drawingReview th,
      #drawingReview td {
        border: 1px solid #ccc;
        padding: 6px;
        text-align: left;
      }

      #drawingReview th {
        background: #eaeaf0;
      }

      #drawingReview tr:nth-child(even) {
        background: #fafafa;
      }

      #drawingReview td input {
        width: 100%;
        border: 1px solid transparent;
        padding: 4px;
        font-size: 0.9rem;
      }

      #drawingReview td input:focus {
        border-color: #999;
      }

      #drawingReview .row-delete-btn {
        width: auto;
        padding: 4px 10px;
        font-size: 0.85rem;
        background: #f5f5f5;
        color: #a00;
        border: 1px solid #ccc;
      }

      .io-badge {
        background: #eaeaf0;
        color: #0e0e10;
        font-weight: 600;
        font-size: 14px;
        padding: 8px 16px;
        border-radius: 20px;
      }

      .io-badge-total {
        background: #0e0e10;
        color: white;
      }

      .io-badge-warning {
        background: #fef3e2;
        color: #b45309;
      }

      #ioResult td.io-flag {
        text-align: center;
        cursor: help;
      }

      /* The I/O table has 9 columns and genuinely needs to scroll
         horizontally on narrow screens — it already does (overflow-x:auto),
         but with no visual cue a user just sees it look cut off on the
         right. Only show the hint where the table actually needs it. */
      .scroll-hint {
        display: none;
        font-size: 12px;
        color: #888;
        margin: 4px 0 6px;
      }
      @media (max-width: 700px) {
        .scroll-hint {
          display: block;
        }
      }

/* ===================== ROBOJARKKO MASCOt ===================== */

:root {
  --robo-primary: #0e8a5f;
  --robo-secondary: #9e8fae;
  --robo-dark: #0e0e10;
  --robo-light: #f6f6f8;
  --robo-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --robo-transition: all 0.3s ease;
}

.robo-instructor {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  width: 120px;
  transition: var(--robo-transition);
}

.robo-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--robo-primary);
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: var(--robo-transition);
}

.robo-instructor.pointing .robo-avatar {
  transform: rotate(-8deg) scale(1.05);
}

.robo-instructor.speaking .robo-avatar {
  animation: robo-pulse 0.6s ease-in-out infinite;
}

@keyframes robo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.robo-speech {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: white;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: var(--robo-shadow);
  margin-bottom: 15px;
  width: max-content;
  max-width: min(280px, calc(100vw - 40px));
  font-size: 14px;
  line-height: 1.4;
  border: 2px solid var(--robo-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10001;
}

.robo-speech::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 52px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: white transparent transparent;
}

.robo-speech.visible {
  opacity: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.robo-instructor.celebrating {
  animation: bounce 0.5s ease infinite;
}

.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10002;
  animation: confettiFall 2s linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.robo-highlight {
  position: absolute;
  border: 3px solid var(--robo-primary);
  border-radius: 8px;
  background: rgba(14, 138, 95, 0.1);
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 0 9999px rgba(14, 138, 95, 0.1);
  animation: pulse-highlight 1.5s ease-in-out infinite;
}

@keyframes pulse-highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 138, 95, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(14, 138, 95, 0); }
}

@media (max-width: 800px) {
  .robo-instructor {
    bottom: 10px;
    left: 10px;
    width: 80px;
  }
  .robo-speech {
    max-width: min(230px, calc(100vw - 20px));
    font-size: 12px;
    padding: 8px 10px;
  }
}

.robo-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-badge 1s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.tour-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--robo-primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--robo-shadow);
  z-index: 10000;
  transition: var(--robo-transition);
}

.tour-btn:hover {
  background: #0c6b48;
  transform: translateY(-2px);
}

.tour-btn:active {
  transform: translateY(0);
}

@media (max-width: 800px) {
  .tour-btn {
    bottom: 10px;
    right: 10px;
    padding: 10px 15px;
    font-size: 14px;
  }
}

/* ===================== END ROBOJARKKO ===================== */
