:root {
  --ink: #1f2933;
  --muted: #64748b;
  --line: #d8e0e8;
  --soft: #f5f8fb;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #be5a38;
  --white: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 10; }
.header-grid { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 21px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--brand); color: white; font-size: 24px; }
.brand-logo { width: auto; height: 38px; max-width: 150px; object-fit: contain; }
.main-nav { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 700; font-size: 14px; }
.hero { background: linear-gradient(180deg, #eef8f6, #fff); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 42px; align-items: center; padding: 54px 0; }
.eyebrow { margin: 0 0 8px; color: var(--accent); text-transform: uppercase; letter-spacing: 0; font-weight: 800; font-size: 13px; }
h1, h2, h3 { line-height: 1.18; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 5vw, 54px); max-width: 880px; }
h2 { font-size: 25px; }
h3 { font-size: 20px; }
.hero-copy, .page-title p, .section-head p { color: var(--muted); font-size: 18px; max-width: 720px; }
.search-box { display: flex; gap: 10px; margin-top: 24px; max-width: 620px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
  background: #fff;
}
button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
}
button:hover, .button-link:hover { background: var(--brand-dark); text-decoration: none; }
button[type="reset"] { background: #e2e8f0; color: var(--ink); }
.quick-calc, .calculator-panel, .info-box, .seo-guide, .form-page, .table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 22px;
}
.quick-calc label { display: block; font-weight: 800; margin-bottom: 10px; }
.quick-calc button { margin-top: 12px; }
.calc-result {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 8px;
}
.calc-result div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #edf2f7; }
.calc-result code { word-break: break-all; }
.legal-disclaimer {
  grid-column: 1 / -1;
  border: 1px solid #f2c94c;
  background: #fffbeb;
  border-radius: 8px;
  padding: 14px;
  color: #713f12;
  display: grid;
  gap: 10px;
}
.legal-disclaimer p { margin: 0; }
.legal-disclaimer .check-row { color: #713f12; }
.ad-top { margin-top: 24px; }
.home-sections { display: flex; flex-direction: column; }
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 18px;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumbs a { font-weight: 700; }
.ad-placeholder, .ad-slot {
  min-height: 88px;
  border: 1px dashed #a5b4c4;
  background: #f8fafc;
  color: #64748b;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  border-radius: 8px;
}
.section { padding: 44px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.category-grid, .article-grid, .dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category-card, .article-card, .stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
}
.category-card p { color: var(--muted); }
.media-card { display: grid; gap: 10px; }
.media-card .button-link { justify-self: start; margin-top: 4px; }
.media-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e6f3ef;
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.media-home-disclaimer { margin-top: 18px; }
.category-card ul { margin: 14px 0 0; padding-left: 18px; }
.category-card li { margin: 7px 0; }
.page-title { padding: 38px 0 20px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 44px; }
.calc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.calc-form label, .admin-form label { display: grid; gap: 7px; font-weight: 700; }
.calc-form label span, .admin-form label span { font-size: 14px; color: #334155; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.sidebar { display: grid; gap: 18px; }
.tool-list { display: grid; gap: 12px; padding-bottom: 44px; }
.tool-row { border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.tool-row p { margin: 0; color: var(--muted); }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.calculator-copy { max-width: 900px; padding: 0 0 48px; }
.faq-list { display: grid; gap: 10px; margin-top: 14px; }
.faq-list details { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fff; }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list p { margin-bottom: 0; color: var(--muted); }
.article-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #e6f3ef;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  font-weight: 800;
  margin-bottom: 14px;
  overflow: hidden;
}
.article-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-page { max-width: 820px; padding: 42px 0; }
.article-page h1 { font-size: clamp(34px, 5vw, 50px); }
.article-meta { color: var(--muted); }
.article-hero {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  border-radius: 8px;
  margin: 20px 0;
  display: block;
}
.article-body { font-size: 18px; }
.author-box { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.author-profile { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: center; padding: 42px 0 18px; }
.author-photo, .author-thumb {
  border-radius: 8px;
  background: #e6f3ef;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  font-weight: 800;
  overflow: hidden;
}
.author-photo { width: 140px; height: 140px; font-size: 46px; }
.author-thumb { width: 58px; height: 58px; flex: 0 0 auto; }
.author-photo img, .author-thumb img { width: 100%; height: 100%; object-fit: cover; }
.author-row { display: flex; gap: 14px; align-items: center; }
.form-page { margin-bottom: 44px; }
.form-page.narrow { max-width: 480px; margin-top: 46px; }
.admin-form { display: grid; gap: 16px; }
.editor-form { align-self: start; }
.field-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.field-card legend { font-weight: 800; padding: 0 8px; }
.menu-row { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.check-row { display: flex !important; align-items: center; gap: 8px; font-weight: 700; }
.check-row input { width: auto; }
.directory-section { padding: 22px; }
.directory-list { display: grid; gap: 10px; padding-left: 18px; }
.directory-list li span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.notice { border: 1px solid #99d6c7; background: #ecfdf5; color: #065f46; padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; }
.error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; }
.admin-title { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.stat-card { color: var(--ink); }
.stat-card strong { display: block; font-size: 38px; color: var(--brand-dark); }
.stat-card span { color: var(--muted); font-weight: 800; }
.seo-guide ul { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px; vertical-align: top; }
td:last-child { display: flex; gap: 10px; flex-wrap: wrap; }
.site-footer {
  border-top: 1px solid var(--line);
  background: #f7f7f7;
  padding: 56px 16px;
  margin-top: 20px;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
  clear: both;
}
.footer-grid,
.footer-center {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px;
  text-align: center !important;
}
.site-footer strong,
.site-footer h2 {
  display: block;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.15;
  color: var(--ink);
  font-weight: 800;
  margin: 0 auto;
  text-align: center;
}
.footer-grid p,
.footer-center p,
.site-footer p {
  margin: 0 auto;
  color: var(--muted);
  max-width: 980px;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.55;
  text-align: center;
}
.footer-links {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 28px;
  flex-wrap: wrap;
  width: 100%;
  text-align: center !important;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
}
.footer-links a { color: var(--brand-dark); }
.footer-grid .copyright,
.footer-center .copyright,
.site-footer .copyright {
  font-size: clamp(16px, 1.8vw, 22px);
  color: var(--muted);
  margin-top: 8px;
  text-align: center !important;
}
.footer-disclaimer { display: none; }
@media (max-width: 900px) {
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .category-grid, .article-grid, .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .header-grid, .section-head, .admin-title, .tool-row { align-items: flex-start; flex-direction: column; }
  .footer-grid, .footer-center { align-items: center; flex-direction: column; text-align: center; }
  .main-nav { gap: 12px; }
  .hero-grid { padding: 36px 0; }
  .category-grid, .article-grid, .dashboard-grid, .calc-form { grid-template-columns: 1fr; }
  .search-box { flex-direction: column; }
  .author-profile { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  background: #fbfcfd;
}
.admin-sidebar {
  background: #fff;
  color: #111827;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #edf1f5;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.admin-brand { color: #111827; font-size: 28px; font-weight: 900; padding: 8px 10px 18px; }
.admin-sidebar nav { display: grid; gap: 6px; }
.admin-nav-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: .04em;
  padding: 12px 10px 4px;
}
.admin-sidebar a { color: #1f2937; border-radius: 10px; padding: 11px 12px; font-weight: 700; }
.admin-sidebar a:hover { background: #f3f7f6; color: var(--brand-dark); text-decoration: none; }
.admin-logout { margin-top: auto; background: #e8f4f1; color: var(--brand-dark) !important; }
.admin-main { padding: 26px 0 52px; min-width: 0; }
.admin-main .wrap { width: min(1180px, calc(100% - 36px)); }
.admin-panel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}
.admin-main .page-title {
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 14px;
  padding: 28px;
  margin-top: 0;
  margin-bottom: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}
.admin-main .stat-card {
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}
.compact-links { columns: 1; padding-left: 18px; }
.compact-links li { margin: 7px 0; }
.real-single { align-self: start; }
.real-hero .quick-calc p { color: var(--muted); }
.real-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.real-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  display: grid;
  gap: 14px;
}
.real-card p { margin: 0; color: var(--muted); }
.real-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.real-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.real-form button { grid-column: 1 / -1; }
.real-result {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.real-result div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf2f7; padding: 6px 0; }
.real-chart { width: 100%; height: 90px; background: #f8fafc; border-radius: 6px; }
.real-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.real-actions a { font-weight: 800; color: var(--brand-dark); }
.lead-mini { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .real-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .real-form, .lead-mini { grid-template-columns: 1fr; }
  .menu-row { grid-template-columns: 1fr; }
}
