/* CricketCals shared styles */

    :root {
      --primary: #0D7C3D;
      --bg: #F7F8FA;
    }

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

    html {
      scroll-behavior: smooth;
      scroll-padding-top: 5rem;
    }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--bg);
      color: #1A1A2E;
    }

    .calc-input {
      transition: border-color .25s, box-shadow .25s;
    }

    .calc-input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(13, 124, 61, .12);
      outline: none;
    }

    .btn-primary {
      transition: all .25s ease;
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(13, 124, 61, .3);
    }

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

    .toast {
      animation: toastIn .35s ease-out, toastOut .35s ease-in 2.2s forwards;
    }

    @keyframes toastIn {
      from {
        opacity: 0;
        transform: translateX(40px)
      }

      to {
        opacity: 1;
        transform: translateX(0)
      }
    }

    @keyframes toastOut {
      from {
        opacity: 1
      }

      to {
        opacity: 0;
        transform: translateX(40px)
      }
    }

    @keyframes resultPop {
      from {
        opacity: 0;
        transform: scale(.92)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    .reveal {
      opacity: 0;
      transform: translateY(30px);
      transition: all .7s cubic-bezier(.16, 1, .3, 1);
    }

    .reveal.visible {
      opacity: 1;
      transform: translateY(0);
    }

        /* Header Dropdown Menu */
    .nav-dropdown-group {
      position: relative;
    }

    .nav-dropdown-menu {
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
      pointer-events: none;
      z-index: 100;
    }

    .nav-dropdown-group:hover .nav-dropdown-menu,
    .nav-dropdown-group:focus-within .nav-dropdown-menu,
    .nav-dropdown-group.open .nav-dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      pointer-events: auto;
    }

    .nav-dropdown-group:hover .nav-calc-btn i,
    .nav-dropdown-group.open .nav-calc-btn i {
      transform: rotate(180deg);
    }
    .mobile-menu {
      transition: max-height .35s ease, opacity .3s ease;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
    }

    .mobile-menu.open {
      max-height: 800px;
      opacity: 1;
      overflow-y: auto;
    }

    .howto-box {
      background: linear-gradient(135deg, #F0FDF4, #ECFDF5 50%, #F0FDF4);
      border: 1px solid #BBF7D0;
      border-radius: 14px;
      padding: 16px 18px;
      position: relative;
    }

    .howto-box::before {
      content: '';
      position: absolute;
      left: 0;
      top: 12px;
      bottom: 12px;
      width: 4px;
      background: linear-gradient(to bottom, #0D7C3D, #3DA854);
      border-radius: 0 4px 4px 0;
    }

    .howto-step {
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }

    .howto-num {
      width: 24px;
      height: 24px;
      min-width: 24px;
      border-radius: 50%;
      background: #0D7C3D;
      color: #fff;
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: .65rem;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 1px;
    }

    .howto-formula {
      background: #fff;
      border: 1px dashed #A5DBAC;
      border-radius: 8px;
      padding: 8px 12px;
      margin-top: 8px;
      font-family: 'Outfit', sans-serif;
      font-weight: 600;
      color: #074E26;
      font-size: .8rem;
      text-align: center;
    }

    .faq-item {
      border: 1px solid #E5E7EB;
      border-radius: 14px;
      transition: all .3s ease;
      overflow: hidden;
      background: #fff;
    }

    .faq-item:hover {
      border-color: #0D7C3D30;
      box-shadow: 0 2px 12px rgba(13, 124, 61, .06);
    }

    .faq-item.open {
      border-color: #0D7C3D40;
      box-shadow: 0 4px 20px rgba(13, 124, 61, .08);
    }

    .faq-question {
      cursor: pointer;
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      user-select: none;
      transition: background .2s;
    }

    .faq-question:hover {
      background: #F0FDF4;
    }

    .faq-question h3 {
      font-family: 'Outfit', sans-serif;
      font-weight: 600;
      font-size: .9rem;
      color: #1A1A2E;
      line-height: 1.4;
    }

    .faq-icon {
      width: 26px;
      height: 26px;
      min-width: 26px;
      border-radius: 8px;
      background: #F0FDF4;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
      color: #0D7C3D;
      font-size: .7rem;
    }

    .faq-item.open .faq-icon {
      background: #0D7C3D;
      color: #fff;
      transform: rotate(180deg);
    }

    .faq-answer {
      max-height: 0;
      overflow: hidden;
      transition: max-height .4s cubic-bezier(.16, 1, .3, 1), padding .3s ease;
      padding: 0 20px;
    }

    .faq-item.open .faq-answer {
      max-height: 400px;
      padding: 0 20px 16px 20px;
    }

    .faq-answer p {
      color: #6B7280;
      font-size: .85rem;
      line-height: 1.7;
    }

    .faq-answer strong {
      color: #374151;
    }

    .faq-number {
      font-family: 'Outfit', sans-serif;
      font-weight: 800;
      font-size: .65rem;
      color: #0D7C3D40;
      letter-spacing: .05em;
    }

    @media(prefers-reduced-motion:reduce) {

      *,
      *::before,
      *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
      }
    }
    [role="region"][tabindex="0"]:focus-visible {
      outline: 3px solid #0D7C3D;
      outline-offset: 3px;
    }
  
.page-banner {
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #032712 0%, #064E24 50%, #0A6531 100%);
    }

    .page-banner::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 60% 50% at 70% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
      pointer-events: none;
    }

    .page-banner::after {
      content: '';
      position: absolute;
      inset: 0;
      opacity: 0.04;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
      background-size: 128px;
      pointer-events: none;
    }

    /* ── BLOG CARD ── */
    .blog-card {
      background: #fff;
      border: 1px solid #E5E7EB;
      border-radius: 18px;
      transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .blog-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: #111827;
      opacity: 0;
      transition: opacity 0.3s;
      z-index: 10;
    }

    .blog-card:hover {
      border-color: #D1D5DB;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
      transform: translateY(-3px);
    }

    .blog-card:hover::before {
      opacity: 1;
    }

    /* thumbnail */
    .card-thumb {
      width: 100%;
      aspect-ratio: 16/10;
      overflow: hidden;
      border-bottom: 1px solid #f3f4f6;
      position: relative;
      flex-shrink: 0;
      background-color: #f8fafc;
    }

    .card-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* card body */
    .card-body {
      padding: 20px 22px 18px;
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    /* category tag */
    .cat-tag {
      display: inline-flex;
      align-items: center;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 2px 9px;
      border-radius: 20px;
      border-width: 1px;
      border-style: solid;
    }

    /* article title */
    .card-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 1.05rem;
      color: #111827;
      line-height: 1.4;
      margin-bottom: 8px;
      min-height: 2.9rem;
      transition: color 0.2s;
    }

    .blog-card:hover .card-title {
      color: #111827;
    }

    /* line clamp utilities */
    .line-clamp-2 {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .line-clamp-3 {
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* excerpt */
    .card-excerpt {
      font-size: 0.85rem;
      color: #4b5563;
      line-height: 1.6;
      min-height: 4.1rem;
      margin-bottom: 10px;
    }

    /* formula line — simple plain text with bold title, not heavily highlighted */
    .formula-line {
      font-size: 0.8rem;
      color: #4b5563;
      line-height: 1.5;
      margin-bottom: 12px;
      min-height: 2.2rem;
    }

    .formula-line strong {
      color: #111827;
      font-weight: 700;
    }

    /* hypothetical note inside modal — clean editorial style */
    .hypo-note {
      display: block;
      font-size: 0.82rem;
      color: #4b5563;
      background: #F9FAFB;
      border-left: 3px solid #9CA3AF;
      padding: 10px 14px;
      border-radius: 0 6px 6px 0;
      margin: 14px 0;
      line-height: 1.6;
    }

    /* footer row */
    .card-footer {
      margin-top: auto;
      padding-top: 14px;
      border-top: 1px solid #f3f4f6;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .author-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 0.65rem;
      color: #fff;
      background: #374151;
    }

    .calc-link {
      font-size: 0.75rem;
      font-weight: 600;
      color: #111827;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border-bottom: 1px solid transparent;
      transition: border-color 0.2s, color 0.2s;
    }

    .calc-link:hover {
      border-bottom-color: #111827;
      color: #4b5563;
    }

    /* tool cards */
    .tool-preview-card {
      background: #fff;
      border: 1px solid #E5E7EB;
      border-radius: 14px;
      padding: 20px;
      transition: all 0.3s ease;
      display: block;
      text-decoration: none;
    }

    .tool-preview-card:hover {
      border-color: #0D7C3D40;
      box-shadow: 0 6px 20px rgba(13, 124, 61, 0.07);
      transform: translateY(-2px);
    }

    ::-webkit-scrollbar {
      width: 8px;
    }

    ::-webkit-scrollbar-track {
      background: #f1f1f1;
    }

    ::-webkit-scrollbar-thumb {
      background: #0D7C3D40;
      border-radius: 4px;
    }

    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
      }
    }
    .guide-copy { color: #4B5563; line-height: 1.8; }
    .guide-copy p + p { margin-top: 1rem; }
    .guide-copy a { color: #0A6531; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
    a:focus-visible, button:focus-visible { outline: 2px solid #0D7C3D; outline-offset: 3px; }
  

/* ===== Fixes: Tailwind has no font-600/700/800/900 utilities, so headings lost their intended weight ===== */
.font-600{font-weight:600}.font-700{font-weight:700}.font-800{font-weight:800}.font-900{font-weight:900}

/* Keep content visible if JavaScript is blocked */
.no-js .reveal{opacity:1;transform:none}
/* ===== Shared article + calculator-page components ===== */
.prose-cc p{color:#4B5563;line-height:1.8;margin-bottom:1rem}
.prose-cc p:last-child{margin-bottom:0}
.prose-cc a{color:#0A6531;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.prose-cc strong{color:#1f2937}
.prose-cc ul{list-style:disc;padding-left:1.5rem;margin:0 0 1rem;color:#4B5563;line-height:1.8}
.prose-cc ol{list-style:decimal;padding-left:1.5rem;margin:0 0 1rem;color:#4B5563;line-height:1.8}
.prose-cc li{margin-bottom:.4rem}
.prose-cc h3{font-family:'Outfit',sans-serif;font-weight:700;font-size:1.125rem;color:#111827;margin:1.5rem 0 .75rem}
.formula-box{background:#EDF7EE;color:#053B1C;border-radius:12px;padding:14px 16px;font-weight:600;margin:0 0 1.25rem;line-height:1.6;overflow-wrap:anywhere}
.note-box{display:block;font-size:.875rem;color:#4b5563;background:#F9FAFB;border-left:3px solid #9CA3AF;padding:10px 14px;border-radius:0 8px 8px 0;margin:0 0 1.25rem;line-height:1.65}
.table-wrap{overflow-x:auto;border:1px solid #E5E7EB;border-radius:12px;margin:0 0 1.25rem}
.table-wrap table{width:100%;text-align:left;font-size:.875rem;border-collapse:collapse}
.table-wrap caption{padding:12px;text-align:left;font-family:'Outfit',sans-serif;font-weight:700;color:#053B1C;background:#EDF7EE}
.table-wrap th,.table-wrap td{padding:12px;color:#4B5563;vertical-align:top}
.table-wrap thead th{background:#F9FAFB;color:#374151;font-weight:600}
.table-wrap tbody tr{border-top:1px solid #F3F4F6}
.table-wrap tbody th{font-weight:600;color:#374151}
.toc-link{color:#074E26;text-decoration:underline;text-underline-offset:3px}
.related-card{display:flex;flex-direction:column;background:#fff;border:1px solid #E5E7EB;border-radius:14px;overflow:hidden;text-decoration:none;transition:border-color .25s,box-shadow .25s,transform .25s;height:100%}
.related-card:hover{border-color:#0D7C3D50;box-shadow:0 8px 24px rgba(13,124,61,.08);transform:translateY(-2px)}
.related-card img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;background:#F3F4F6}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #0D7C3D;outline-offset:3px}
.skip-link{position:absolute;left:-9999px;top:0;background:#0D7C3D;color:#fff;padding:8px 14px;border-radius:0 0 8px 0;z-index:300;font-weight:600}
.skip-link:focus{left:0}
.nm-row{display:grid;gap:.75rem;grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;border:1px solid #E5E7EB;border-radius:14px;background:#FAFAFA}
@media(min-width:640px){.nm-row{grid-template-columns:repeat(4,minmax(0,1fr))}}
.nm-row label{display:block;font-size:.75rem;font-weight:600;color:#374151;margin-bottom:4px}
.nm-row input[type=number],.nm-row input[type=text]{width:100%;padding:8px 10px;border:1px solid #E5E7EB;border-radius:10px;background:#fff;font-weight:500;font-size:.9rem}
.nm-row input:focus{border-color:#0D7C3D;box-shadow:0 0 0 3px rgba(13,124,61,.12);outline:none}
img{max-width:100%;height:auto}
.nm-check{display:flex;align-items:center;gap:6px;font-size:.75rem;color:#4B5563;margin-top:6px}

.faq-item.open .faq-answer{max-height:1200px}
