:root {
      --primary: #0A4D68;
      --primary-dark: #06384d;
      --primary-light: #0e6b91;
      --accent: #047857;
      --accent-light: #059669;
      --secondary: #D97706;
      --bg-body: #F8FAFB;
      --bg-card: #FFFFFF;
      --bg-section: #F1F5F9;
      --text-main: #1C1917;
      --text-muted: #57534E;
      --text-light: #78716C;
      --border-subtle: #E2E8F0;
      --border-medium: #CBD5E1;
      --container-width: 1200px;
      --header-height: 90px;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
      --shadow-lg: 0 16px 48px rgba(0,0,0,0.10);
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 20px;
    }
    [data-theme="dark"] {
      --bg-body: #0C0A09;
      --bg-card: #1C1917;
      --bg-section: #151312;
      --text-main: #F5F5F4;
      --text-muted: #A8A29E;
      --text-light: #78716C;
      --primary: #38BDF8;
      --primary-light: #7DD3FC;
      --accent: #34D399;
      --accent-light: #6EE7B7;
      --border-subtle: #292524;
      --border-medium: #3D3835;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
      --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html:focus-within { scroll-behavior: smooth; }

    body {
      font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
      background-color: var(--bg-body);
      color: var(--text-main);
      line-height: 1.75;
      -webkit-font-smoothing: antialiased;
      transition: background-color 0.4s ease, color 0.4s ease;
    }

    a { text-decoration: none; color: inherit; transition: 0.2s ease; }
    img { max-width: 100%; display: block; }

    .container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }

    .sr-only { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

    :focus-visible {
      outline: 3px solid rgba(217, 119, 6, 0.55);
      outline-offset: 3px;
    }

    @media (prefers-reduced-motion: reduce) {
      html:focus-within { scroll-behavior: auto; }
      * { transition: none !important; animation: none !important; }
    }

    /* Skip link */
    .skip-link {
      position: absolute;
      left: -9999px;
      top: 10px;
      background: var(--secondary);
      color: #fff;
      padding: 10px 14px;
      z-index: 3000;
      border-radius: 6px;
      font-weight: 700;
    }
    .skip-link:focus { left: 12px; }

    /* Top bar */
    .top-bar {
      background-color: #0A4D68;
      color: #fff;
      padding: 8px 0;
      font-size: 0.85rem;
      position: relative;
      z-index: 1002;
    }
    .top-bar .container {
      display: flex;
      justify-content: flex-end;
      gap: 20px;
      padding-right: 20px;
      align-items: center;
    }

    .theme-toggle {
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: transparent;
      border: 1px solid rgba(255,255,255,0.35);
      color: #fff;
      padding: 6px 10px;
      border-radius: 999px;
      min-height: 38px;
      font-size: 0.85rem;
      font-family: inherit;
    }
    .theme-toggle:hover { border-color: rgba(255,255,255,0.7); }

    .lang-selector { display: flex; align-items: center; gap: 6px; }
    .lang-selector select {
      background: transparent;
      border: 1px solid rgba(255,255,255,0.35);
      color: #fff;
      font-size: 0.85rem;
      cursor: pointer;
      outline: none;
      padding: 6px 10px;
      border-radius: 999px;
      min-height: 38px;
      font-family: inherit;
    }
    .lang-selector select option {
      background-color: #0A4D68;
      color: #fff;
    }

    /* Main header */
    .main-header {
      background-color: var(--bg-card);
      border-bottom: 1px solid var(--border-subtle);
      position: sticky;
      top: 0;
      z-index: 1000;
      height: var(--header-height);
      box-shadow: var(--shadow-sm);
    }
    .main-header .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 100%;
    }

    .logo {
      font-family: 'Playfair Display', serif;
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 12px;
      letter-spacing: -0.02em;
    }

    .nav-menu { display: flex; gap: 28px; list-style: none; align-items: center; }
    .nav-link {
      font-weight: 700;
      color: var(--text-muted);
      font-size: 0.92rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      position: relative;
    }
    .nav-link:hover, .nav-link.active { color: var(--primary); }
    .nav-link.active::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--primary);
      border-radius: 2px;
    }

    .btn-outline {
      border: 2px solid var(--primary);
      color: var(--primary);
      padding: 8px 20px;
      border-radius: 999px;
      text-transform: uppercase;
      font-size: 0.85rem;
      font-weight: 800;
      letter-spacing: 0.05em;
      min-height: 38px;
      display: inline-flex;
      align-items: center;
    }
    .btn-outline:hover { background-color: var(--primary); color: #fff; }

    /* Breadcrumb */
    .breadcrumb-bar {
      background: var(--bg-section);
      border-bottom: 1px solid var(--border-subtle);
      padding: 12px 0;
    }
    .breadcrumb-list {
      list-style: none;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.85rem;
      color: var(--text-light);
      flex-wrap: wrap;
    }
    .breadcrumb-list a {
      color: var(--primary);
      font-weight: 600;
    }
    .breadcrumb-list a:hover { text-decoration: underline; }
    .breadcrumb-sep { color: var(--text-light); opacity: 0.5; }

    /* Page header */
    .page-header {
      padding: 48px 0 16px;
      text-align: center;
      background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-body) 100%);
    }
    .page-header h1 {
      font-family: 'Playfair Display', serif;
      font-weight: 800;
      color: var(--primary);
      font-size: clamp(1.8rem, 4vw, 2.6rem);
      letter-spacing: -0.03em;
      margin-bottom: 14px;
      line-height: 1.2;
    }
    .page-header .subtitle {
      font-size: 1.15rem;
      color: var(--text-muted);
      max-width: 750px;
      margin: 0 auto;
      line-height: 1.7;
    }

    .trust-row {
      max-width: 980px;
      margin: 24px auto 0;
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 0 24px;
    }
    .trust-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-card);
      color: var(--text-muted);
      padding: 8px 14px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 0.85rem;
      box-shadow: var(--shadow-sm);
    }
    .trust-pill strong { color: var(--primary); }
    .trust-pill i { flex-shrink: 0; }

    /* Tool */
    .tool-section { padding: 24px 0 40px; }
    .tool-card {
      max-width: 920px;
      margin: 0 auto;
      background-color: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-lg);
    }
    .tool-card-inner { padding: 28px; }

    .tool-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.78rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.10em;
      color: var(--text-muted);
      margin-bottom: 4px;
    }
    .tool-label .unit-badge {
      background: var(--primary);
      color: #fff;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 0.7rem;
      font-weight: 800;
      letter-spacing: 0.05em;
    }

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

    .field label {
      display: block;
      font-size: 0.78rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.10em;
      color: var(--text-muted);
      margin-bottom: 8px;
    }

    .field input {
      width: 100%;
      padding: 14px 16px;
      border-radius: var(--radius-sm);
      border: 2px solid var(--border-subtle);
      background: var(--bg-body);
      color: var(--text-main);
      font-size: 16px;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .field input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 4px rgba(10, 77, 104, 0.12);
    }
    .field input::placeholder { color: var(--text-light); }

    .field-hint {
      font-size: 0.78rem;
      color: var(--text-light);
      margin-top: 4px;
    }

    .actions {
      display: flex;
      gap: 10px;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      margin-top: 18px;
    }

    .btn {
      border: 2px solid var(--border-subtle);
      background-color: var(--bg-card);
      color: var(--text-main);
      padding: 10px 18px;
      border-radius: 999px;
      font-weight: 800;
      cursor: pointer;
      min-height: 44px;
      font-family: inherit;
      font-size: 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
    }
    .btn:hover {
      border-color: var(--primary);
      color: var(--primary);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
    }
    .btn-primary {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
    }
    .btn-primary:hover {
      background: var(--primary-dark);
      color: #fff;
      border-color: var(--primary-dark);
    }

    .formula-hint {
      color: var(--text-light);
      font-weight: 700;
      font-size: 0.88rem;
      text-align: center;
      background: var(--bg-section);
      padding: 8px 16px;
      border-radius: 999px;
      display: inline-block;
    }

    .result-box {
      margin-top: 20px;
      border-top: 2px solid var(--border-subtle);
      padding-top: 20px;
      display: grid;
      gap: 12px;
    }
    .result-line {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .result-label {
      color: var(--text-muted);
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.10em;
      font-size: 0.78rem;
    }
    .result-value {
      font-family: 'Playfair Display', serif;
      font-size: 1.6rem;
      font-weight: 800;
      color: var(--primary);
    }
    .result-status {
      font-size: 0.82rem;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .status-normal { background: #DCFCE7; color: #166534; }
    .status-pre { background: #FEF3C7; color: #92400E; }
    .status-high { background: #FEE2E2; color: #991B1B; }
    [data-theme="dark"] .status-normal { background: #14532D; color: #86EFAC; }
    [data-theme="dark"] .status-pre { background: #78350F; color: #FDE68A; }
    [data-theme="dark"] .status-high { background: #7F1D1D; color: #FCA5A5; }

    .legal-strip {
      background: rgba(10, 77, 104, 0.05);
      border-top: 1px solid var(--border-subtle);
      padding: 14px 28px;
      color: var(--text-muted);
      font-size: 0.88rem;
      line-height: 1.6;
    }
    .legal-strip strong { color: var(--text-main); }

    /* Content sections */
    .content-area {
      max-width: 920px;
      margin: 0 auto;
      padding: 0 6px;
    }

    .content-block {
      margin-top: 40px;
    }
    .content-block h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.65rem;
      margin: 0 0 16px;
      letter-spacing: -0.02em;
      color: var(--text-main);
      line-height: 1.3;
    }
    .content-block h3 {
      font-family: 'Source Sans 3', sans-serif;
      font-size: 1.2rem;
      margin: 24px 0 10px;
      color: var(--text-main);
      font-weight: 700;
    }
    .content-block p {
      color: var(--text-muted);
      font-size: 1.02rem;
      margin-bottom: 14px;
    }
    .content-block p a {
      color: var(--accent);
      text-decoration: underline;
      font-weight: 600;
    }
    .content-block p a:hover { color: var(--accent-light); }
    .content-block ul, .content-block ol {
      margin-left: 20px;
      margin-bottom: 14px;
    }
    .content-block li {
      color: var(--text-muted);
      font-size: 1.02rem;
      margin-bottom: 6px;
    }

    .callout {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-left: 4px solid var(--primary);
      border-radius: var(--radius-sm);
      padding: 20px;
      margin: 18px 0;
      box-shadow: var(--shadow-sm);
    }
    .callout p { margin-bottom: 6px; }
    .callout p:last-child { margin-bottom: 0; }

    .callout-accent {
      border-left-color: var(--accent);
    }
    .callout-warning {
      border-left-color: var(--secondary);
      background: rgba(217, 119, 6, 0.04);
    }

    /* Conversion Table */
    .table-wrapper {
      overflow-x: auto;
      margin: 18px 0;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-subtle);
      box-shadow: var(--shadow-sm);
    }
    .conversion-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.95rem;
    }
    .conversion-table caption {
      padding: 14px 18px;
      font-weight: 800;
      text-align: left;
      background: var(--bg-section);
      border-bottom: 1px solid var(--border-subtle);
      color: var(--text-main);
      font-size: 1rem;
    }
    .conversion-table thead th {
      background: var(--primary);
      color: #fff;
      padding: 12px 16px;
      text-align: center;
      font-weight: 700;
      font-size: 0.88rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .conversion-table tbody td {
      padding: 10px 16px;
      text-align: center;
      border-bottom: 1px solid var(--border-subtle);
      color: var(--text-main);
    }
    .conversion-table tbody tr:nth-child(even) {
      background: var(--bg-section);
    }
    .conversion-table tbody tr:hover {
      background: rgba(10, 77, 104, 0.06);
    }
    .conversion-table .highlight-row {
      background: rgba(4, 120, 87, 0.08) !important;
      font-weight: 700;
    }

    /* FAQ Accordion */
    .faq-section { margin-top: 40px; }
    .faq-item {
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      margin-bottom: 10px;
      overflow: hidden;
      background: var(--bg-card);
      box-shadow: var(--shadow-sm);
    }
    .faq-question {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 18px 20px;
      background: none;
      border: none;
      cursor: pointer;
      font-family: inherit;
      font-size: 1.02rem;
      font-weight: 700;
      color: var(--text-main);
      text-align: left;
      gap: 12px;
      min-height: 44px;
    }
    .faq-question:hover { color: var(--primary); }
    .faq-chevron {
      flex-shrink: 0;
      transition: transform 0.3s ease;
      color: var(--text-light);
    }
    .faq-item.open .faq-chevron { transform: rotate(180deg); }
    .faq-answer {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.35s ease;
    }
    .faq-answer-inner {
      padding: 0 20px 18px;
      color: var(--text-muted);
      font-size: 0.98rem;
      line-height: 1.7;
    }
    .faq-item.open .faq-answer { max-height: 500px; }

    /* Referencias */
    .references {
      margin-top: 30px;
      padding: 20px;
      background: var(--bg-section);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-subtle);
    }
    .references h3 {
      font-size: 1rem;
      margin-bottom: 12px;
      color: var(--text-main);
    }
    .references ol {
      margin-left: 20px;
      font-size: 0.88rem;
      color: var(--text-light);
    }
    .references li {
      margin-bottom: 8px;
      line-height: 1.5;
    }
    .references a {
      color: var(--accent);
      text-decoration: underline;
      word-break: break-all;
    }

    /* Related tools */
    .related-tools {
      margin-top: 40px;
      padding: 30px 0;
      border-top: 1px solid var(--border-subtle);
    }
    .related-tools h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.5rem;
      margin-bottom: 20px;
      color: var(--text-main);
    }
    .tools-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 16px;
    }
    .tool-link-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 18px;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-sm);
      transition: all 0.2s;
    }
    .tool-link-card:hover {
      border-color: var(--primary);
      box-shadow: var(--shadow-md);
      transform: translateY(-2px);
    }
    .tool-link-card .tool-icon {
      width: 44px;
      height: 44px;
      background: var(--bg-section);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--primary);
    }
    .tool-link-card .tool-info h3 {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text-main);
      margin: 0;
    }
    .tool-link-card .tool-info p {
      font-size: 0.82rem;
      color: var(--text-light);
      margin: 2px 0 0;
    }

    /* Footer */
    footer {
      background-color: #1C1917;
      color: #A8A29E;
      padding: 80px 0 0;
      font-size: 0.95rem;
      border-top: 4px solid var(--accent);
      margin-top: 60px;
    }
    .footer-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 50px;
      padding-bottom: 60px;
    }
    .footer h4 {
      color: #fff;
      font-family: 'Playfair Display', serif;
      font-size: 1.3rem;
      margin-bottom: 25px;
      letter-spacing: 0.05em;
      position: relative;
    }
    .footer h4::after {
      content: '';
      display: block;
      width: 30px;
      height: 2px;
      background-color: var(--accent);
      margin-top: 10px;
    }
    .footer ul { list-style: none; }
    .footer ul li { margin-bottom: 12px; }
    .footer ul li a { color: #A8A29E; display: inline-block; }
    .footer ul li a:hover { color: #fff; transform: translateX(5px); }

    .footer-bottom {
      border-top: 1px solid #333;
      padding: 30px 0;
      text-align: center;
      font-size: 0.85rem;
      background-color: #151312;
    }

    /* Mobile */
    @media (max-width: 820px) {
      .nav-menu { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
      .grid { grid-template-columns: 1fr; }
      .tool-card-inner { padding: 20px; }
      .legal-strip { padding: 12px 20px; }
      .page-header { padding: 32px 0 12px; }
      .content-block { margin-top: 30px; }
      .trust-row { gap: 8px; }
      .trust-pill { font-size: 0.78rem; padding: 6px 10px; }
    }

    @media (max-width: 480px) {
      .logo { font-size: 1.4rem; }
      .result-value { font-size: 1.3rem; }
      .conversion-table { font-size: 0.85rem; }
      .conversion-table thead th { padding: 10px 8px; font-size: 0.78rem; }
      .conversion-table tbody td { padding: 8px; }
    }

    /* Print */
    @media print {
      .top-bar, .main-header, .breadcrumb-bar, .trust-row, footer, .actions, .related-tools { display: none; }
      body { background: #fff; color: #000; }
      .tool-card { box-shadow: none; border: 1px solid #ccc; }
    }
