/* Cellforge — Clean Energy Light (DESIGN.md). Tokens: bg #f3f6f4,
   surface #ffffff, panel #e7efeb, line #c9d8d1, ink #152420,
   muted #54665e, accent #0c7a5b, accent-deep #084c39, amber #e9a23b. */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --panel: #e7efeb;
  --line: #c9d8d1;
  --ink: #152420;
  --muted: #54665e;
  --accent: #0c7a5b;
  --accent-deep: #084c39;
  --amber: #e9a23b;
  --maxw: 1140px;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16.5px/1.65 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent-deep); }
img { max-width: 100%; display: block; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-in { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 12px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: inset 0 0 0 3px var(--amber); }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mainnav { margin-left: auto; }
.navlist { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.navlink { display: block; padding: 8px 11px; text-decoration: none; color: var(--ink); border-radius: 8px; font-size: 15px; }
.navlink:hover { background: var(--panel); }
.navlink-cta { background: var(--accent); color: #fff; font-weight: 600; }
.navlink-cta:hover { background: var(--accent-deep); }
.has-menu { position: relative; }
.menu {
  position: absolute; left: 0; top: 100%; min-width: 250px; list-style: none;
  margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 14px 34px rgba(21,36,32,.14);
  visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.has-menu:hover .menu, .has-menu:focus-within .menu {
  visibility: visible; opacity: 1; pointer-events: auto; transform: none;
}
.menu a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14.5px; }
.menu a:hover { background: var(--panel); }

/* language switcher: details holds ONLY the summary (AGENTS.md red line);
   options live in the sibling .langopts element. */
.langwrap { position: relative; }
.langswitch summary { cursor: pointer; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); list-style: none; }
.langswitch summary::-webkit-details-marker { display: none; }
.langopts {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px; display: none; box-shadow: 0 14px 34px rgba(21,36,32,.14);
}
.langwrap:has(.langswitch[open]) .langopts, .langwrap:has(details[open]) .langopts { display: block; }
.langopt { display: block; padding: 6px 9px; font-size: 14px; text-decoration: none; color: var(--ink); border-radius: 6px; }
.langopt.is-current { font-weight: 700; color: var(--accent-deep); }
.langopt.is-off { color: var(--muted); }

/* layout */
.page-main { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 56px; }
.hero { padding: 26px 0 8px; }
.kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; margin: 0 0 8px; }
h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 25px; line-height: 1.25; margin: 34px 0 12px; }
h3 { font-size: 18px; margin: 14px 0 6px; }
.lede { font-size: 18.5px; color: var(--muted); max-width: 760px; margin: 0 0 18px; }
.section { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 26px; }

/* signature: cell-readout strip — text varies per page (DESIGN.md) */
.sigline {
  display: block; font: 600 13px/1.5 "Consolas", "SFMono-Regular", monospace;
  letter-spacing: .06em; color: var(--accent-deep); background: var(--panel);
  border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: 8px; padding: 9px 14px; margin: 0 0 16px; max-width: 880px;
}
.sigline--detail { border-left-color: var(--amber); background: var(--surface); }
.sigline--category { border-left-width: 10px; }
.sigline--blog { color: var(--muted); background: transparent; border-style: dashed; }
.sigline--page { border-left-color: var(--accent-deep); }

/* hero figure + specplate */
.hero-fig { margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.hero-fig img { border-radius: 10px; width: 100%; }
.hero-fig figcaption { color: var(--muted); font-size: 13.5px; padding: 8px 4px 2px; }
.specplate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.specplate-h { font-size: 17px; margin: 0 0 10px; color: var(--accent-deep); }
.specplate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 22px; margin: 0; }
.specplate-row dt { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.specplate-row dd { margin: 2px 0 0; font-weight: 600; }

/* tables */
.tablewrap { overflow-x: auto; margin: 14px 0; }
.spectable { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 15px; }
.spectable th, .spectable td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.spectable thead th { background: var(--panel); color: var(--accent-deep); }
.spectable th[scope="row"] { background: var(--panel); width: 34%; }

/* cards */
.cardgrid { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0; }
.card { flex: 1 1 300px; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-h { margin: 0; font-size: 17.5px; }
.card-h a { text-decoration: none; color: var(--ink); }
.card-text { color: var(--muted); font-size: 14.5px; margin: 0; flex: 1; }
.card-link { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14.5px; }
.ticklist { padding-left: 20px; }
.ticklist li { margin: 5px 0; }

/* faq + cta + related */
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; }
.faq-q { margin: 0 0 4px; font-size: 16.5px; color: var(--accent-deep); }
.faq-a { margin: 0; color: var(--muted); }
.cta-block { background: var(--accent-deep); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin: 34px 0 6px; }
.cta-block h2 { color: #fff; margin-top: 0; }
.cta-block p { color: #dcebe4; max-width: 720px; }
.btn { display: inline-block; text-decoration: none; border-radius: 9px; padding: 11px 20px; font-weight: 600; border: 0; cursor: pointer; font-size: 15.5px; }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.related-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.related-list a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; text-decoration: none; font-size: 14.5px; }

/* forms */
.inquiry-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 640px; display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field-label { font-weight: 600; font-size: 14.5px; }
.field input, .field textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; background: #fff; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.botcheck { display: none; }

/* footer */
.site-footer { background: var(--ink); color: #cfe0d8; margin-top: 40px; }
.footer-in { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 28px; padding: 34px 20px 10px; }
.footer-col { flex: 1 1 200px; }
.footer-brand .brand-name { color: #fff; }
.footer-tag, .footer-addr { color: #a9c2b6; font-size: 14px; max-width: 320px; }
.footer-h { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { color: #cfe0d8; text-decoration: none; font-size: 14.5px; display: block; padding: 3px 0; }
.footer-links a:hover { color: var(--amber); }
.footer-base { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px 22px; font-size: 13px; color: #8fa79b; border-top: 1px solid #2c3f38; }

@media (max-width: 860px) {
  h1 { font-size: 30px; }
  .header-in { gap: 12px; }
  .mainnav { order: 3; width: 100%; }
  .navlist { gap: 2px; }
  .card { max-width: none; }
  .cta-block { padding: 20px; }
}
