/* ===== ConvBolt — Unit Converter — Editorial Utility Tool ===== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --primary: #0e7c86;
  --primary-dark: #0a5c64;
  --primary-light: #e0f2f4;
  --accent: #f59e0b;
  --text: #2c2c2c;
  --text-light: #7a7a7a;
  --bg: #f6f8f9;
  --card: #ffffff;
  --border: #e3e8ea;
  --radius: 14px;
  --max-width: 820px;
  --shadow: 0 2px 12px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.03);
  --success: #0e7c86;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.7; font-size: 16px;
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.site-header::before {
  content: ''; display: block; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}
.site-header .inner { max-width: var(--max-width); margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
.site-header .logo { font-family: 'Space Grotesk', sans-serif; font-size: 20px; color: var(--primary); text-decoration: none; letter-spacing: -.3px; font-weight: 700; }
.site-header .nav-links { display: flex; gap: 20px; list-style: none; }
.site-header .nav-links a { color: var(--text-light); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; letter-spacing: .02em; }
.site-header .nav-links a:hover { color: var(--primary); }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 40px 20px 60px; }
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px; font-weight: 700; line-height: 1.2; margin-bottom: 16px;
  letter-spacing: -.5px; color: var(--text);
}
.intro { color: var(--text-light); font-size: 17px; margin-bottom: 32px; max-width: 640px; line-height: 1.75; }
.intro em { color: var(--primary); font-style: normal; font-weight: 600; }

/* Tool card */
.tool-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.tool-card .field { margin-bottom: 22px; }
.tool-card label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); letter-spacing: .02em; }
.tool-card input[type="number"], .tool-card .unit-select {
  width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px;
  font-size: 17px; color: var(--text); background: var(--bg); transition: border-color .2s, box-shadow .2s;
  font-family: 'DM Sans', sans-serif;
}
.tool-card input:focus, .tool-card .unit-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,124,134,.1); }
.tool-card .unit-select { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a7a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.tool-card .btn {
  width: 100%; padding: 16px; background: var(--primary); color: #fff; border: none;
  border-radius: 10px; font-size: 17px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .1s; font-family: 'DM Sans', sans-serif;
  letter-spacing: .02em;
}
.tool-card .btn:hover { background: var(--primary-dark); }
.tool-card .btn:active { transform: scale(.99); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 120px; }
.input-suffix .suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 14px; font-weight: 500; pointer-events: none; white-space: nowrap; }

/* Category tabs */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-tab {
  flex: 1; min-width: 90px; padding: 11px 8px; border: 2px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text-light); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* Conversion row */
.convert-row { display: grid; grid-template-columns: 1.2fr 1fr 44px 1fr; gap: 12px; align-items: end; }
.convert-row .field { margin-bottom: 0; }
.convert-value input { font-weight: 700; font-size: 19px; }
.swap-col { display: flex; justify-content: center; }
.swap-btn {
  width: 44px; height: 44px; border: 2px solid var(--border); border-radius: 10px;
  background: var(--primary-light); color: var(--primary); font-size: 20px; font-weight: 700;
  cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; justify-content: center;
}
.swap-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.swap-btn:active { transform: scale(.95); }

/* Quick chips */
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.chip {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: #fff8eb; }

/* Results */
.results { margin-top: 28px; display: none; }
.results.show { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.result-hero {
  border-radius: var(--radius); padding: 32px; text-align: center;
  background: linear-gradient(135deg, #eef7f8, #dcf0f2); border: 1px solid #b9dfe3;
}
.result-hero .result-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-dark); margin-bottom: 10px; }
.result-hero .conv-big { font-family: 'Space Grotesk', sans-serif; font-size: 48px; font-weight: 700; line-height: 1.15; color: var(--primary-dark); overflow-wrap: break-word; }
.result-hero .conv-detail { font-size: 18px; font-weight: 600; margin-top: 12px; color: var(--text); }
.result-hero .conv-equation { font-size: 13px; color: var(--text-light); margin-top: 10px; }

.error-msg { color: #c0524a; font-size: 14px; margin-top: 14px; display: none; }
.error-msg.show { display: block; }

/* Content sections */
.section { margin-top: 48px; }
.section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.3px;
}
.section h3 { font-size: 17px; font-weight: 600; margin: 20px 0 10px; color: var(--primary-dark); }
.section p { margin-bottom: 14px; color: var(--text); }
.section ol, .section ul { margin: 0 0 16px 22px; }
.section li { margin-bottom: 8px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary {
  font-weight: 600; font-size: 16px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; color: var(--primary); font-weight: 300; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin-top: 12px; color: var(--text-light); font-size: 15px; }

/* Footer */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 36px 20px; }
.site-footer .inner { max-width: var(--max-width); margin: 0 auto; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.site-footer .footer-links a { color: var(--text-light); text-decoration: none; font-size: 14px; transition: color .2s; }
.site-footer .footer-links a:hover { color: var(--primary); }
.site-footer .copyright { font-size: 13px; color: #a0a0a0; }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--text); color: #fff;
  padding: 18px 20px; z-index: 9999; display: none; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 14px; max-width: 600px; }
.cookie-banner p a { color: #8fd9df; }
.cookie-banner .cookie-btns { display: flex; gap: 10px; }
.cookie-banner .btn-cookie { padding: 9px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; }
.cookie-banner .btn-accept { background: var(--primary); color: #fff; }
.cookie-banner .btn-accept:hover { background: var(--primary-dark); }
.cookie-banner .btn-decline { background: transparent; color: #fff; border: 1px solid #64748b; }
.cookie-banner .btn-decline:hover { background: rgba(255,255,255,.1); }

/* Responsive */
@media (max-width: 600px) {
  .site-header .nav-links { gap: 14px; }
  .site-header .nav-links a { font-size: 13px; }
  h1 { font-size: 27px; }
  .tool-card { padding: 20px; }
  .convert-row { grid-template-columns: 1fr 1fr; }
  .convert-value { grid-column: 1 / -1; }
  .swap-col { grid-column: 1 / -1; order: 3; justify-content: center; margin: 4px 0; }
  .result-hero .conv-big { font-size: 38px; }
  .section h2 { font-size: 22px; }
  .cookie-banner { flex-direction: column; text-align: center; }
}

/* Generic compliance pages */
.page-content { max-width: var(--max-width); margin: 0 auto; padding: 40px 20px 60px; }
.page-content h1 { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; margin-bottom: 24px; }
.page-content h2 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; color: var(--primary-dark); }
.page-content p { margin-bottom: 14px; color: var(--text); }
.page-content ul { margin: 0 0 16px 22px; }
.page-content li { margin-bottom: 8px; }
.page-content a { color: var(--primary); }
.contact-form { margin-top: 20px; }
.contact-form .field { margin-bottom: 18px; }
.contact-form label { display:block; font-weight:600; font-size:14px; margin-bottom:8px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border: 2px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: 'DM Sans', sans-serif; background: var(--bg); transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.contact-form .btn { padding: 13px 30px; background: var(--primary); color:#fff; border:none; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; font-family: 'DM Sans', sans-serif; }

/* ===== Article list (homepage) — white cards ===== */
.article-list { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.content-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; font-weight: 700; margin-bottom: 20px; letter-spacing: -.3px;
}
.article-list a {
  display: block; text-decoration: none; background: #ffffff;
  border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.article-list a:hover {
  border-color: var(--primary); box-shadow: 0 4px 16px rgba(14,124,134,.12); transform: translateY(-2px);
}
.article-list .article-title {
  font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; line-height: 1.4;
}
.article-list a:hover .article-title { color: var(--primary); }
.article-list .article-desc {
  font-size: 14px; color: var(--text-light); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-list .view-all {
  display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600;
  color: var(--primary); text-decoration: none; transition: opacity .2s;
}
.article-list .view-all:hover { opacity: .7; }

/* ===== Article detail page — light reading area ===== */
.article-content { padding: 48px 0; background: var(--bg); }
.article-content .inner { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.article-content article {
  background: #ffffff; border-radius: 16px;
  padding: 48px 56px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.article-content h1 {
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700;
  color: var(--text); margin-bottom: 12px; line-height: 1.25; letter-spacing: -.5px;
  text-transform: capitalize;
}
.article-content .article-meta {
  font-size: .85rem; color: var(--text-light); margin-bottom: 32px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.article-content h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700;
  color: var(--text); margin: 40px 0 16px; line-height: 1.3; letter-spacing: -.3px;
}
.article-content h3 {
  font-size: 1.1rem; font-weight: 600; color: var(--primary-dark);
  margin: 28px 0 12px; line-height: 1.35;
}
.article-content p { margin-bottom: 18px; color: var(--text); line-height: 1.85; font-size: 1rem; }
.article-content ul, .article-content ol { margin: 0 0 20px 24px; }
.article-content li { margin-bottom: 10px; color: var(--text); line-height: 1.8; font-size: 1rem; }
.article-content strong { color: var(--text); font-weight: 700; }
.article-content code {
  font-family: 'DM Sans', monospace; background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 7px; border-radius: 4px; font-size: .88em;
}
.article-content blockquote {
  border-left: 4px solid var(--primary); padding: 16px 22px; margin: 24px 0;
  background: var(--primary-light); border-radius: 0 8px 8px 0; color: var(--text); font-size: .95rem;
}
.article-content a { color: var(--primary); text-decoration: none; font-weight: 500; }
.article-content a:hover { text-decoration: underline; }

/* Article FAQ section */
.faq-section { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--border); }
.faq-section h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 20px; letter-spacing: -.3px;
}
.faq-section .faq details {
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px;
  background: var(--bg); overflow: hidden; transition: all .2s;
}
.faq-section .faq details[open] { border-color: var(--primary); box-shadow: 0 2px 8px rgba(14,124,134,.08); }
.faq-section .faq summary {
  padding: 16px 20px; font-weight: 600; font-size: .95rem; cursor: pointer;
  list-style: none; color: var(--text); transition: color .2s;
  display: flex; align-items: center; gap: 10px;
}
.faq-section .faq summary::-webkit-details-marker { display: none; }
.faq-section .faq summary::before {
  content: '+'; color: var(--primary); font-weight: 700; font-size: 1.2rem;
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); border-radius: 6px; flex-shrink: 0;
}
.faq-section .faq details[open] summary::before { content: '\2212'; background: var(--primary); color: #fff; }
.faq-section .faq summary:hover { color: var(--primary); }
.faq-section .faq details p {
  padding: 0 20px 18px 50px; margin: 0; color: var(--text-light); font-size: .92rem; line-height: 1.75;
}

/* Article back link */
.article-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px;
  font-size: .88rem; color: var(--text-light); text-decoration: none; font-weight: 500;
  transition: color .2s;
}
.article-back:hover { color: var(--primary); }
.article-back::before { content: '\2190'; font-size: 1.1rem; }

/* Article page mobile */
@media (max-width: 600px) {
  .article-content article { padding: 28px 22px; border-radius: 12px; }
  .article-content h1 { font-size: 1.5rem; }
  .article-content h2 { font-size: 1.2rem; margin: 32px 0 14px; }
  .article-content h3 { font-size: 1rem; }
  .article-content p, .article-content li { font-size: .94rem; }
  .faq-section .faq details p { padding-left: 20px; }
}

/* ===== Related articles ===== */
.related-articles { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--border); }
.related-articles h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 20px; letter-spacing: -.3px;
}
.related-articles ul { list-style: none; display: grid; gap: 10px; }
.related-articles a {
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500;
  transition: all .2s; line-height: 1.5;
}
.related-articles a:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 2px 8px rgba(14,124,134,.1); }
