:root{
  --kotech-navy:#0b2a57;
  --kotech-navy2:#062043;
  --kotech-green:#79c000;
  --ink:#0b1220;
  --bg:#eef2f7;
  --card:#ffffff;
  --line:rgba(15, 23, 42, .12);
  --muted:rgba(15, 23, 42, .68);
  --shadow: 0 10px 30px rgba(2, 6, 23, .10);
  --radius: 10px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  background: var(--bg);
}

body.embed{
  background: transparent;
}

body.embed .page--embed{
  background: transparent;
}

.topbar{
  background: white;
  border-bottom: 4px solid var(--kotech-navy);
}
.topbar__inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand:focus-visible{ outline: 3px solid rgba(121,192,0,.55); outline-offset: 4px; border-radius: 12px; }
.brand__logo{
  height: 30px;
  width: auto;
  max-width: 190px;
  display:block;
  object-fit: contain;
}
.brand__mark{
  width:42px; height:42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--kotech-navy), var(--kotech-green));
  box-shadow: 0 8px 18px rgba(11,42,87,.18);
}
.brand__name{ font-weight:800; letter-spacing:.02em; color: var(--kotech-navy); }
.brand__tag{ font-size: 12px; color: rgba(11,42,87,.72); margin-top:2px; }
.topbar__actions{ display:flex; align-items:center; gap:12px; }
.link{ color: var(--kotech-navy); text-decoration:none; font-weight:600; }
.link:hover{ text-decoration:underline; }

.page{ min-height:100%; }
.hero{
  background: linear-gradient(180deg, rgba(11,42,87,.08), rgba(11,42,87,0));
}
.hero__inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px 10px;
}
.hero__title{
  margin:0;
  font-size: 28px;
  font-weight: 800;
  color: #334155;
  text-align:center;
}
.hero__sub{
  margin:10px auto 0;
  max-width: 720px;
  color: var(--muted);
  text-align:center;
  line-height:1.45;
}

.content{
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 28px;
}

body.embed .hero__inner{ padding-top: 10px; }
body.embed .content{ padding-top: 8px; padding-bottom: 10px; }

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card + .card{ margin-top: 18px; }

.bar{
  background: var(--kotech-navy);
  color: white;
  font-weight: 800;
  padding: 10px 12px;
  font-size: 14px;
  text-align:center;
}

.grid{ padding: 10px 12px 12px; display:grid; gap:10px; }
.row{
  display:grid;
  grid-template-columns: 220px 220px 1fr;
  gap: 10px;
  align-items:center;
}
.label{ font-weight: 700; color: #334155; }

.field{
  display:flex;
  align-items:center;
  gap:8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
}
.num{
  width: 100%;
  border: none;
  outline: none;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  background: transparent;
}
.row--readonly .field{ background: rgba(2,6,23,.03); }

.unit{ color: rgba(15,23,42,.65); font-weight: 700; font-size: 12px; }

.slider{ width: 100%; accent-color: var(--kotech-green); }

.hint{ color: var(--muted); font-size: 12px; }

.advanced{
  padding: 12px;
  border: 1px dashed rgba(11,42,87,.25);
  border-radius: 10px;
  background: rgba(11,42,87,.03);
}

.split{
  padding: 12px;
  display:grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  align-items:start;
}

.table{
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow:hidden;
}
.tr{ display:grid; grid-template-columns: 1fr 180px; }
.td{ padding: 10px 12px; border-bottom: 1px solid var(--line); }
.td--k{ background: rgba(148,163,184,.25); font-weight: 700; }
.td--v{ text-align:right; font-weight: 800; }
.tr--total .td{ border-bottom: 0; }
.tr--total .td--k{ background: rgba(121,192,0,.20); }
.tr--total .td--v{ color: var(--kotech-navy); }
.tr--note .td{ border-top: 1px solid var(--line); border-bottom: 0; }

.chart{
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: white;
}
.legend{ margin-top: 10px; display:grid; gap:8px; }
.leg{ display:grid; grid-template-columns: 16px 1fr auto; gap:8px; align-items:center; font-size: 13px; }
.sw{ width: 12px; height: 12px; border-radius: 3px; display:inline-block; }
.sw--p{ background:#1d4ed8; }
.sw--m{ background:#ef4444; }
.sw--e{ background:#f59e0b; }
.pct{ color: rgba(15,23,42,.7); font-weight:700; }

.actions{ padding: 0 12px 14px; display:flex; gap:10px; justify-content:center; }

.btn{
  appearance:none;
  border: 1px solid rgba(11,42,87,.2);
  background: linear-gradient(180deg, rgba(121,192,0,.95), rgba(121,192,0,.78));
  color: #0b1220;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 10px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.btn:hover{ filter: brightness(1.03); }
.btn--ghost{
  background: white;
  color: var(--kotech-navy);
}

.card--form{ margin-top: 18px; }
.muted{ color: var(--muted); padding: 12px; margin:0; }
.form{ padding: 0 12px 14px; }
.form__grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.f{ display:grid; gap:6px; }
.f--wide{ grid-column: 1 / -1; }
.fl{ font-weight: 700; color: #334155; font-size: 13px; }
.fi{
  width:100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  outline: none;
}
.fi:focus{ border-color: rgba(11,42,87,.45); box-shadow: 0 0 0 4px rgba(11,42,87,.10); }
.form__actions{ margin-top: 10px; display:flex; gap:10px; align-items:center; }

.footer{
  margin-top: 18px;
  background: var(--kotech-navy2);
  color: rgba(255,255,255,.88);
}
.footer__inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  display:grid;
  gap:6px;
}
.footer__brand{ font-weight: 900; letter-spacing: .02em; }
.footer__muted{ color: rgba(255,255,255,.70); font-size: 12px; line-height:1.45; }

@media (max-width: 980px){
  .row{ grid-template-columns: 1fr; }
  .field{ width: 100%; }
  .split{ grid-template-columns: 1fr; }
  .chart canvas{ width: 100%; height: auto; }
  .form__grid{ grid-template-columns: 1fr; }
}
