/* Page-specific layout: subnetting.php. Shared UI: /css/cotnas-global.css */

    :root {
      --bg: #020b13;
      --bg-soft: #07131e;
      --panel: rgba(7, 19, 30, 0.84);
      --panel-2: rgba(10, 25, 39, 0.92);
      --panel-3: rgba(9, 19, 32, 0.96);
      --text: #edf7f4;
      --muted: #aac2bc;
      --line: rgba(43, 255, 188, 0.12);
      --line-strong: rgba(43, 255, 188, 0.24);
      --accent: #3bffc7;
      --accent-2: #17d79a;
      --accent-soft: rgba(59, 255, 199, 0.12);
      --glow: 0 0 24px rgba(59, 255, 199, 0.16);
      --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
      --danger: #ff8080;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      font-family: 'Inter', system-ui, sans-serif;
      background:
        radial-gradient(circle at 18% 18%, rgba(59, 255, 199, 0.05), transparent 24%),
        radial-gradient(circle at 82% 20%, rgba(59, 255, 199, 0.04), transparent 20%),
        linear-gradient(180deg, #01080e 0%, #03111c 100%);
      color: var(--text);
      min-height: 100vh;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background-image:
        linear-gradient(rgba(59,255,199,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,255,199,0.018) 1px, transparent 1px);
      background-size: 48px 48px;
      pointer-events: none;
      opacity: 0.45;
    }

    a { color: inherit; text-decoration: none; }

    .container {
      width: min(1260px, calc(100% - 32px));
      margin: 0 auto;
      position: relative;
      z-index: 1;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 30;
      backdrop-filter: blur(12px);
      background: rgba(2, 10, 16, 0.92);
      border-bottom: 1px solid rgba(43, 255, 188, 0.08);
    }

    .nav {
      min-height: 68px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .logo {
      font-weight: 800;
      letter-spacing: 0.22em;
      color: var(--accent);
      text-shadow: var(--glow);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 14px;
      color: #f2faf7;
      font-weight: 500;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 46px;
      padding: 0 22px;
      border-radius: 14px;
      border: 1px solid var(--line-strong);
      font-weight: 600;
      transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
      cursor: pointer;
      font: inherit;
    }

    .btn:hover { transform: translateY(-1px); }

    .btn-primary {
      color: #072117;
      background: linear-gradient(180deg, rgba(59,255,199,0.96), rgba(23,215,154,0.92));
      box-shadow: 0 10px 24px rgba(23, 215, 154, 0.2);
      border-color: rgba(59,255,199,0.42);
    }

    .btn-secondary {
      color: var(--text);
      background: rgba(6, 18, 28, 0.9);
    }

    .btn-ghost {
      color: var(--accent);
      background: rgba(10, 26, 22, 0.62);
      box-shadow: inset 0 0 0 1px rgba(59,255,199,0.08);
    }

    .hero {
      padding: 52px 0 26px;
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
      gap: 56px;
      align-items: center;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      border: 1px solid rgba(59,255,199,0.18);
      border-radius: 999px;
      padding: 10px 16px;
      color: var(--accent);
      background: rgba(6, 22, 19, 0.5);
      box-shadow: inset 0 0 0 1px rgba(59,255,199,0.03);
      font-size: .92rem;
    }

    .hero h1 {
      margin: 24px 0 18px;
      font-size: clamp(3rem, 7vw, 5rem);
      line-height: 0.95;
      letter-spacing: -0.05em;
      text-shadow: 0 0 18px rgba(223,255,245,.15), 0 0 30px rgba(59,255,199,.08);
    }

    .hero p {
      margin: 0;
      color: #d4e6df;
      font-size: clamp(1rem, 1.5vw, 1.14rem);
      line-height: 1.78;
      max-width: 58ch;
    }

    .hero-actions {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      margin-top: 28px;
    }

    .terminal-card {
      position: relative;
      border-radius: 24px;
      border: 1px solid rgba(121, 155, 255, 0.18);
      background: linear-gradient(180deg, rgba(19, 29, 55, 0.96), rgba(5, 15, 40, 0.98));
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0,0,0,.36);
    }

    .terminal-top {
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      color: #d8deef;
      font-size: 0.92rem;
      background: linear-gradient(180deg, rgba(61,76,121,.82), rgba(40,52,90,.82));
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .traffic {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .traffic span {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      display: inline-block;
    }

    .traffic span:nth-child(1){ background:#ff6e67; }
    .traffic span:nth-child(2){ background:#f7c84a; }
    .traffic span:nth-child(3){ background:#4bd665; }

    .terminal-body {
      min-height: 344px;
      padding: 20px 20px 26px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      color: #8de8ff;
      font-size: 0.98rem;
      background:
        radial-gradient(circle at 50% 0%, rgba(29, 42, 94, 0.22), transparent 55%),
        linear-gradient(180deg, rgba(4, 10, 30, 0.94), rgba(3, 10, 33, 0.98));
    }

    .terminal-line { margin-bottom: 10px; white-space: pre-wrap; }
    .terminal-line.command { color: #9bc1ff; }
    .terminal-line.result { color: #98ffe7; }
    .terminal-line.dim { color: #88aac7; }

    .section {
      padding: 56px 0 34px;
    }

    .section-title {
      text-align: center;
      margin-bottom: 26px;
    }

    .section-title h2 {
      margin: 0 0 12px;
      font-size: clamp(2.1rem, 4vw, 3.1rem);
      letter-spacing: -0.04em;
    }

    .section-title p {
      margin: 0 auto;
      max-width: 65ch;
      color: var(--muted);
      line-height: 1.8;
      font-size: 1.02rem;
    }

    .calculator-shell {
      border-radius: 28px;
      border: 1px solid rgba(43,255,188,0.11);
      background: linear-gradient(180deg, rgba(3, 13, 22, 0.95), rgba(4, 17, 28, 0.98));
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .shell-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      padding: 16px 22px;
      border-bottom: 1px solid rgba(43,255,188,0.09);
      background: rgba(2, 10, 16, 0.84);
    }

    .shell-title {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .shell-title-badge {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      color: var(--accent);
      background: rgba(11, 31, 26, 0.8);
      border: 1px solid rgba(59,255,199,0.14);
      box-shadow: inset 0 0 0 1px rgba(59,255,199,0.04), var(--glow);
    }

    .shell-title-badge svg {
      width: 22px;
      height: 22px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }

    .shell-title h3 {
      margin: 0;
      font-size: 1.18rem;
      letter-spacing: -0.02em;
    }

    .shell-title p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 0.93rem;
    }

    .shell-chip {
      padding: 8px 12px;
      border-radius: 999px;
      border: 1px solid rgba(59,255,199,0.16);
      color: var(--accent);
      background: rgba(8, 28, 23, 0.72);
      font-weight: 700;
      font-size: 0.8rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .calculator-grid {
      display: grid;
      grid-template-columns: minmax(0, .92fr) minmax(380px, 1.08fr);
      gap: 0;
    }

    .calc-form,
    .calc-output {
      padding: 28px;
    }

    .calc-form {
      border-right: 1px solid rgba(43,255,188,0.08);
      background: linear-gradient(180deg, rgba(4, 17, 28, 0.8), rgba(5, 16, 26, 0.95));
    }

    .block-title {
      margin-bottom: 20px;
    }

    .block-title h4 {
      margin: 0 0 8px;
      font-size: 1.04rem;
      letter-spacing: -0.02em;
    }

    .block-title p {
      margin: 0;
      color: var(--muted);
      line-height: 1.72;
      font-size: 0.95rem;
    }

    .field {
      margin-bottom: 16px;
    }

    .field label {
      display: inline-block;
      margin-bottom: 8px;
      font-weight: 600;
      color: #f5fcfa;
    }

    .field small {
      display: block;
      margin-top: 8px;
      color: var(--muted);
      line-height: 1.5;
    }

    .input-wrap {
      position: relative;
    }

    .input-prefix {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--accent);
      font-weight: 700;
      font-size: 0.95rem;
      pointer-events: none;
      opacity: .86;
    }

    input {
      width: 100%;
      min-height: 50px;
      border-radius: 14px;
      border: 1px solid rgba(59,255,199,0.12);
      background: rgba(8, 21, 32, 0.96);
      color: var(--text);
      padding: 0 16px;
      font: inherit;
      outline: none;
      transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    }

    input.with-prefix { padding-left: 36px; }

    input:focus {
      border-color: rgba(59,255,199,0.34);
      box-shadow: 0 0 0 4px rgba(59,255,199,0.08), 0 0 26px rgba(59,255,199,0.06);
      background: rgba(10, 24, 37, 1);
    }

    input.invalid {
      border-color: rgba(255,128,128,.45);
      box-shadow: 0 0 0 4px rgba(255,128,128,.08);
    }

    .form-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 18px;
    }

    .message {
      margin-top: 16px;
      border-radius: 14px;
      padding: 0;
      min-height: 0;
      font-weight: 600;
      overflow: hidden;
    }

    .message.has-content { padding: 12px 14px; }
    .message.success {
      background: rgba(59,255,199,0.08);
      border: 1px solid rgba(59,255,199,0.16);
      color: #cffff0;
    }
    .message.error {
      background: rgba(255,128,128,0.08);
      border: 1px solid rgba(255,128,128,0.18);
      color: #ffd8d8;
    }

    .summary-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 14px;
      margin-bottom: 18px;
    }

    .kpi {
      border-radius: 18px;
      background: linear-gradient(180deg, rgba(7, 20, 30, 0.96), rgba(6, 18, 28, 0.92));
      border: 1px solid rgba(59,255,199,0.08);
      padding: 16px;
      box-shadow: inset 0 0 0 1px rgba(59,255,199,0.02);
    }

    .kpi span {
      display: block;
      font-size: 0.78rem;
      color: var(--muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .kpi strong {
      display: block;
      font-size: 1.02rem;
      line-height: 1.45;
      color: #f5fcfa;
      word-break: break-word;
    }

    .kpi small {
      display: block;
      margin-top: 8px;
      color: var(--muted);
      line-height: 1.55;
    }

    .result-card {
      border-radius: 20px;
      border: 1px solid rgba(59,255,199,0.08);
      background: linear-gradient(180deg, rgba(6, 17, 27, 0.95), rgba(4, 15, 24, 0.96));
      overflow: hidden;
      margin-bottom: 18px;
    }

    .result-card-header {
      padding: 14px 18px;
      border-bottom: 1px solid rgba(59,255,199,0.07);
      color: var(--accent);
      font-weight: 700;
      letter-spacing: 0.03em;
      background: rgba(3, 12, 20, 0.88);
    }

    .result-table {
      width: 100%;
      border-collapse: collapse;
    }

    .result-table tr:not(:last-child) td {
      border-bottom: 1px solid rgba(59,255,199,0.06);
    }

    .result-table td {
      padding: 13px 18px;
      vertical-align: top;
      font-size: 0.94rem;
    }

    .result-table td:first-child {
      width: 38%;
      color: #9fd0c1;
    }

    .mono {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      color: #dffcf1;
    }

    .range-visual {
      margin-top: 18px;
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid rgba(59,255,199,0.08);
      background: rgba(5, 17, 27, 0.88);
    }

    .range-bar {
      display: grid;
      grid-template-columns: .9fr 2.2fr .9fr;
      min-height: 60px;
    }

    .segment {
      display: grid;
      place-items: center;
      padding: 14px;
      font-size: 0.9rem;
      font-weight: 700;
      text-align: center;
      border-right: 1px solid rgba(59,255,199,0.07);
    }

    .segment:last-child { border-right: none; }
    .segment.network { background: rgba(59,255,199,0.09); color: #d8fff0; }
    .segment.hosts { background: rgba(38, 81, 82, 0.18); color: #ecfdf7; }
    .segment.broadcast { background: rgba(16, 42, 42, 0.3); color: #c6fff0; }

    .range-note {
      padding: 13px 16px;
      color: var(--muted);
      line-height: 1.62;
      border-top: 1px solid rgba(59,255,199,0.07);
    }

    .services {
      padding-top: 50px;
      padding-bottom: 80px;
    }

    .service-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 18px;
      margin-top: 30px;
    }

    .service-card {
      border-radius: 20px;
      border: 1px solid rgba(59,255,199,0.08);
      background: linear-gradient(180deg, rgba(4, 15, 24, 0.92), rgba(6, 18, 28, 0.98));
      padding: 22px;
      box-shadow: inset 0 0 0 1px rgba(59,255,199,0.02);
    }

    .service-card h4 {
      margin: 0 0 10px;
      font-size: 1.02rem;
    }

    .service-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.72;
      font-size: 0.94rem;
    }

    .fab {
      position: fixed;
      right: 22px;
      bottom: 22px;
      width: 54px;
      height: 54px;
      border-radius: 999px;
      border: none;
      background: linear-gradient(180deg, rgba(108,255,183,1), rgba(59,255,199,1));
      box-shadow: 0 12px 24px rgba(59,255,199,0.22);
      cursor: pointer;
    }

    @media (max-width: 1080px) {
      .hero,
      .calculator-grid,
      .service-grid {
        grid-template-columns: 1fr;
      }
      .calc-form { border-right: none; border-bottom: 1px solid rgba(43,255,199,0.08); }
    }

    @media (max-width: 760px) {
      .container { width: min(100% - 20px, 1260px); }
      .nav { flex-direction: column; align-items: flex-start; padding: 12px 0; }
      .hero { padding-top: 32px; gap: 30px; }
      .hero h1 { font-size: clamp(2.45rem, 13vw, 3.5rem); }
      .hero-actions, .form-actions { flex-direction: column; }
      .btn { width: 100%; }
      .summary-grid { grid-template-columns: 1fr; }
      .range-bar { grid-template-columns: 1fr; }
      .segment { border-right: none; border-bottom: 1px solid rgba(59,255,199,0.07); }
      .segment:last-child { border-bottom: none; }
    }

    @media print {
      .topbar, .hero, .services, .fab, .form-actions, .message { display: none !important; }
      body { background: #fff; color: #111; }
      .container { width: 100%; }
      .calculator-shell, .result-card, .kpi, .range-visual {
        box-shadow: none !important;
        background: #fff !important;
        color: #111 !important;
        border-color: #ddd !important;
      }
      .result-card-header, .shell-top { color: #111 !important; background: #f7f7f7 !important; }
      .mono { color: #111 !important; }
    }
  
