:root {
  --bg: #0b1f17;
  --bg-card: #123324;
  --border: #1f4a34;
  --text: #eafff0;
  --text-dim: #9fc9ae;
  --accent: #d4af37;
  --accent-dim: #a9872b;
  --hit: #b5453c;
  --stand: #3c7a4f;
  --double: #c98a2c;
  --split: #3a6ea5;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.5;
}
h1, h2, h3, .brand-name { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.accent { color: var(--accent); }

.site-header { border-bottom: 1px solid var(--border); padding: 18px 0; }
.header-inner { display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.2rem; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #1a1a1a; font-weight: 800; }

.hero { padding: 48px 0 32px; text-align: center; }
.hero-title { font-size: 2.4rem; margin: 0 0 12px; }
.hero-sub { color: var(--text-dim); max-width: 560px; margin: 0 auto 28px; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.calc-card { max-width: 640px; margin: 0 auto; text-align: left; }
.calc-section { margin-bottom: 20px; }
.calc-label { font-weight: 700; margin-bottom: 8px; color: var(--accent); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.card-display { min-height: 40px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chosen-card { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; background: var(--accent); color: #1a1a1a; font-weight: 700; }
.placeholder { color: var(--text-dim); font-size: .9rem; }
.card-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.card-btn { background: #0e2a1e; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 10px 0; font-weight: 700; cursor: pointer; font-size: .95rem; }
.card-btn:hover { border-color: var(--accent); }

.btn { border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); }
.btn-secondary { background: transparent; color: var(--text-dim); }
.btn-secondary:hover { color: var(--text); border-color: var(--accent); }

.hand-summary { margin-top: 18px; color: var(--text-dim); font-size: .95rem; }
.result { margin-top: 8px; }
.result-action { display: inline-block; padding: 14px 24px; border-radius: 10px; font-size: 1.4rem; font-weight: 800; }

.act-hit { background: var(--hit); color: #fff; }
.act-stand { background: var(--stand); color: #fff; }
.act-double { background: var(--double); color: #1a1a1a; }
.act-split { background: var(--split); color: #fff; }

.seo { padding: 32px 0; }
.seo-heading { font-size: 1.6rem; margin-bottom: 8px; }
.chart-note { color: var(--text-dim); margin-bottom: 20px; font-size: .92rem; }
.legend { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 10px; margin-right: 2px; }
.swatch.act-hit { background: var(--hit); }
.swatch.act-stand { background: var(--stand); }
.swatch.act-double { background: var(--double); }
.swatch.act-split { background: var(--split); }

.table-wrap { overflow-x: auto; margin-bottom: 28px; }
.strategy-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.strategy-table th, .strategy-table td { text-align: center; padding: 8px 6px; border: 1px solid var(--border); font-size: .85rem; }
.strategy-table thead th { background: #0e2a1e; color: var(--accent); }
.strategy-table tbody th { background: #0e2a1e; text-align: left; padding-left: 12px; }
.strategy-table td { font-weight: 700; }

.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.seo-card h3 { margin-top: 0; margin-bottom: 8px; font-size: 1.05rem; }
.seo-card p { color: var(--text-dim); margin: 6px 0; font-size: .93rem; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--text-dim); font-size: .85rem; }

@media (max-width: 520px) {
  .card-grid { grid-template-columns: repeat(5, 1fr); }
  .hero-title { font-size: 1.9rem; }
}

.footer-nav{margin:0 0 10px;font-weight:600}
.footer-nav a{color:inherit;text-decoration:none;opacity:.85}
.footer-nav a:hover{opacity:1;text-decoration:underline}

/* ---- Nearlimit additions. Same tokens, same chrome as the sister site. ---- */
body { font-size: 18px; }
a { color: var(--accent); }
.header-inner { justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.header-nav { display: flex; gap: 18px; font-weight: 600; font-size: .95rem; }
.header-nav a { color: var(--text-dim); text-decoration: none; }
.header-nav a:hover { color: var(--text); }
.hero.tool-hero { padding: 32px 0 20px; text-align: left; }
.tool-hero .hero-title { font-size: 2.1rem; line-height: 1.15; }
.tool-hero .hero-sub { margin: 0 0 20px; max-width: 680px; }
.tool-card { max-width: 760px; margin: 0; }
.field { margin-bottom: 16px; }
.field label, .field .calc-label { display: block; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.drop { display: block; border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; background: #0e2a1e; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input[type=file] { display: block; margin: 10px auto 0; color: var(--text-dim); max-width: 100%; font: inherit; font-size: .95rem; }
.drop strong { color: var(--text); }
select, input[type=number], input[type=text] { width: 100%; background: #0e2a1e; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 1rem; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--text-dim); }
.check input { margin-top: 5px; accent-color: var(--accent); }
.btn-primary { background: var(--accent); color: #1a1a1a; border-color: var(--accent); font-size: 1.05rem; padding: 13px 24px; }
.btn-primary:hover { background: var(--accent-dim); }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.cap-line { font-size: .95rem; color: var(--text-dim); margin: 0 0 14px; }
.cap-line strong { color: var(--accent); }
.status { margin-top: 14px; color: var(--text-dim); font-size: .95rem; min-height: 1.4em; }
.progress { height: 8px; background: #0e2a1e; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-top: 10px; display: none; }
.progress.on { display: block; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.result-box { margin-top: 16px; }
.out { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 10px; background: #0e2a1e; }
.out .size { font-family: 'JetBrains Mono', monospace; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; border-radius: 8px; padding: 4px 10px; font-weight: 800; font-size: .9rem; margin-left: 8px; vertical-align: middle; }
.badge.ok { background: var(--stand); color: #fff; }
.badge.no { background: var(--hit); color: #fff; }
.out .note { color: var(--text-dim); font-size: .92rem; margin: 8px 0 0; }
.out a.dl { display: inline-block; margin-top: 10px; font-weight: 700; background: var(--accent); color: #1a1a1a; text-decoration: none; padding: 9px 16px; border-radius: 10px; }
.preview { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin-top: 10px; display: block; }
.warn { border-left: 3px solid var(--double); padding: 8px 12px; background: rgba(201,138,44,.08); color: var(--text-dim); font-size: .93rem; border-radius: 0 8px 8px 0; margin: 12px 0 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--text); }
.prose .dim { color: var(--text-dim); }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.example { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.example p { margin: 6px 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { color: var(--text-dim); margin: 8px 0 0; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.related a { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); background: var(--bg-card); font-weight: 600; }
.related a:hover { border-color: var(--accent); }
.disclaimer { color: var(--text-dim); font-size: .9rem; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 36px; }
.dir-group { margin: 34px 0 0; }
.dir-group h2 { font-size: 1.35rem; margin: 0 0 10px; }
.dir-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.dir-list a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; background: var(--bg-card); color: var(--text); }
.dir-list a:hover { border-color: var(--accent); }
.dir-list strong { display: block; font-size: 1.02rem; }
.dir-list span { display: block; color: var(--text-dim); font-size: .9rem; margin-top: 3px; }
.home-hero { text-align: left; }
.home-hero .hero-sub { margin: 0 0 8px; max-width: 680px; }
.crop-wrap { position: relative; max-width: 360px; margin-top: 10px; }
.crop-wrap canvas { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--border); }
.files-list { margin-top: 8px; }
@media (max-width: 520px) {
  .tool-hero .hero-title { font-size: 1.7rem; }
  .header-nav { gap: 12px; font-size: .9rem; }
  .container { padding: 0 16px; }
}
