/* ==========================================================================
   InchToCM — stylesheet
   Light theme, Inter, neutral slate palette with a deep teal accent.
   ========================================================================== */

:root {
  --canvas: #f4f6f8;
  --paper: #ffffff;
  --ink: #15202b;
  --ink-2: #39485a;
  --muted: #697787;
  --line: #e2e8ed;
  --line-2: #ccd6de;
  --brand: #0f6b5f;
  --brand-dark: #0a5148;
  --brand-tint: #ecf5f2;
  --danger: #b12a30;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(21, 32, 43, .06);
  --shadow-md: 0 2px 10px rgba(21, 32, 43, .07);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1rem; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--paper); border: 1px solid var(--line-2);
  padding: 10px 14px; border-radius: var(--r-sm); font-size: .9rem;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.02em;
}
.brand-mark { color: var(--brand); flex: none; }
.brand-name { white-space: nowrap; }
.brand-join {
  color: var(--muted);
  font-weight: 500;
  font-size: .8em;
  padding: 0 .06em;
}
.brand:hover { color: var(--brand-dark); }
.brand:hover .brand-join { color: #7f9a94; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 500;
}
.site-nav a:hover { background: var(--canvas); color: var(--ink); }
.site-nav a[aria-current="page"] { color: #fff; background: green; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font: inherit;
  font-size: .9rem;
  color: var(--ink-2);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; border-top: 1px solid var(--line); padding: 6px 0 10px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 11px 10px; }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding-top: 18px;
  padding-bottom: 34px;
  align-items: start;
}

@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; }
}

.col-main { min-width: 0; }
.col-side { min-width: 0; }
.side-sticky { position: sticky; top: 80px; display: grid; gap: 18px; }

.page-intro { margin-bottom: 16px; }
.page-intro p { color: var(--ink-2); max-width: 62ch; margin-bottom: 0; }

/* ==========================================================================
   Ad placeholders  (replace the inner markup with AdSense code)
   ========================================================================== */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #eef1f4;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ad-slot-label {
  font-size: .68rem;
  letter-spacing: .04em;
  color: #96a2ae;
  text-transform: uppercase;
}
.ad-slot--lead { min-height: 100px; margin: 16px 0 0; }
.ad-slot--mid { min-height: 250px; margin: 26px 0; }
.ad-slot--wide { min-height: 120px; margin: 10px 0 26px; }
.ad-slot--side { min-height: 320px; }

@media (min-width: 1000px) {
  .ad-slot--lead { min-height: 90px; }
  .ad-slot--wide { min-height: 250px; }
  .ad-slot--side { min-height: 600px; }
}

/* ==========================================================================
   Converter tool
   ========================================================================== */

.tool {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--brand-tint);
  border-bottom: 1px solid #dcebe6;
}

.tool-units { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--brand-dark); }
.tool-unit { font-size: .98rem; }
.tool-arrow { color: #5f9a90; }

.tool-body { padding: 20px 18px 22px; }

.field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input-group:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 107, 95, .14);
}
.input-group input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 13px 14px;
  font: inherit;
  font-size: 1.22rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--r-md);
}
.input-group input:focus { outline: none; }
.input-unit {
  display: flex;
  align-items: center;
  padding: 0 15px;
  background: var(--canvas);
  border-left: 1px solid var(--line);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
}

.field-help { margin: 7px 0 0; font-size: .82rem; color: var(--muted); }
.field-error { margin: 8px 0 0; font-size: .87rem; color: var(--danger); font-weight: 500; }

.input-group.is-invalid { border-color: var(--danger); }
.input-group.is-invalid:focus-within { box-shadow: 0 0 0 3px rgba(177, 42, 48, .13); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-quiet { background: var(--paper); border-color: var(--line-2); color: var(--ink-2); }
.btn-quiet:hover { background: var(--canvas); color: var(--ink); }
.btn-ghost { background: transparent; border-color: #bcd8d1; color: var(--brand-dark); }
.btn-ghost:hover { background: #e0efeb; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }

.tool-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.decimals {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  color: var(--muted);
}
.decimals select {
  font: inherit;
  font-size: .88rem;
  color: var(--ink);
  padding: 7px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--paper);
}

/* Result */
.result {
  position: relative;
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--brand-tint);
  border: 1px solid #d7e9e3;
  border-radius: var(--r-md);
}
.result-label { margin: 0; font-size: .78rem; font-weight: 600; color: #4f8c81; letter-spacing: .02em; }
.result-value {
  margin: 2px 0 4px;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: -.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.result-unit { font-size: 1.1rem; font-weight: 600; margin-left: 6px; }
.result-working { margin: 0; font-size: .88rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.btn-copy {
  margin-top: 12px;
  background: var(--paper);
  border: 1px solid #bcd8d1;
  color: var(--brand-dark);
  padding: 8px 14px;
  font-size: .85rem;
}
.btn-copy:hover { background: #e2efeb; }
.btn-copy.is-done { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (min-width: 620px) {
  .btn-copy { position: absolute; top: 14px; right: 14px; margin-top: 0; }
  .result { padding-right: 150px; }
}

.result-extra {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}
.result-extra > div {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  min-width: 0;
}
.result-extra dt { font-size: .76rem; color: var(--muted); margin-bottom: 2px; }
.result-extra dd {
  margin: 0;
  font-size: .97rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .result-extra { grid-template-columns: minmax(0, 1fr); }
  .result-value { font-size: 1.8rem; }
  .tool-actions .btn { flex: 1 1 auto; }
  .decimals { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ==========================================================================
   Prose sections
   ========================================================================== */

.prose {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 20px;
  margin-bottom: 22px;
}
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-bottom: .6rem; }
.prose h3 { margin-top: 1.4rem; }
.prose p { color: var(--ink-2); max-width: 72ch; }
.prose ul, .prose ol { color: var(--ink-2); padding-left: 1.15rem; }
.note { font-size: .9rem; color: var(--muted); }

.formula {
  display: inline-block;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--ink);
}
.formula-out { color: var(--brand-dark); }
.formula-in { color: var(--ink); }

.examples {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 8px;
}
.examples li {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums;
}
.examples span { color: var(--muted); font-size: .92rem; }
.examples strong { color: var(--ink); font-weight: 650; }
.examples em { color: var(--muted); font-style: normal; font-size: .84rem; }

/* Table */
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.conv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  font-variant-numeric: tabular-nums;
  min-width: 320px;
}
.conv-table th, .conv-table td {
  text-align: left;
  padding: 9px 12px;
  border: 1px solid var(--line);
}
.conv-table thead th {
  font-size: .8rem;
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid green;
  background: green;
}
.conv-table tbody th { font-weight: 650; color: var(--ink); width: 110px; }
.conv-table tbody td { color: var(--ink-2); }
.conv-table tbody tr:hover { background: #f8fafb; }
.conv-table tbody tr:last-child th,
.conv-table tbody tr:last-child td { border-bottom: 0; }

/* FAQ accordion */
.faq { display: grid; gap: 8px; margin-bottom: 1rem; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 44px 13px 14px;
  position: relative;
  font-weight: 600;
  font-size: .97rem;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { background: var(--canvas); }
.faq details p { margin: 0; padding: 0 14px 14px; color: var(--ink-2); font-size: .94rem; }

/* ==========================================================================
   Author box
   ========================================================================== */

.authorbox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin-bottom: 22px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.authorbox:hover, .authorbox:focus-within {
  border-color: #bcd8d1;
  box-shadow: var(--shadow-md);
}

.authorbox-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.authorbox-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-tint);
  flex: none;
}

.authorbox-id { flex: 1 1 200px; min-width: 0; }
.authorbox-kicker { margin: 0; font-size: .76rem; color: var(--muted); }
.authorbox-name {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.authorbox-name:hover { color: var(--brand-dark); text-decoration: underline; }
.authorbox-role { margin: 0; font-size: .86rem; color: var(--muted); }
.authorbox-updated { margin: 0; font-size: .76rem; color: var(--muted); text-align: right; line-height: 1.4; }
.authorbox-updated strong { color: var(--ink-2); font-weight: 600; }

.authorbox-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .2s ease;
}
.authorbox:hover .authorbox-panel,
.authorbox:focus-within .authorbox-panel,
.authorbox.is-open .authorbox-panel { grid-template-rows: 1fr; }

.authorbox-panel-inner { overflow: hidden; min-height: 0; }
.authorbox-panel-inner p {
  margin: 14px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .92rem;
  color: var(--ink-2);
  max-width: 70ch;
}
.authorbox-link { font-size: .89rem; font-weight: 600; }

@media (max-width: 520px) {
  .authorbox-updated { text-align: left; width: 100%; }
}

/* ==========================================================================
   Sidebar cards
   ========================================================================== */

.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 14px;
}
.side-card h2 { font-size: 1rem; margin-bottom: .6rem; }
.side-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.side-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .9rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}
.side-list li:last-child { border-bottom: 0; }
.side-list strong { color: var(--ink); font-weight: 600; }
.side-note { margin: 0; font-size: .82rem; color: var(--muted); }

/* ==========================================================================
   Simple content pages
   ========================================================================== */

.page-head {
  padding: 22px 0 4px;
}
.page-head h1 { margin-bottom: .35rem; }
.page-head p { color: var(--ink-2); max-width: 70ch; margin-bottom: 0; }

.breadcrumb {
  font-size: .82rem;
  color: var(--muted);
  padding-top: 14px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

.content-narrow { max-width: 760px; }

.toc {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.toc ul { margin: 0; padding-left: 1.1rem; }
.toc li { font-size: .92rem; margin-bottom: 3px; }

/* ==========================================================================
   Contact form
   ========================================================================== */

.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 11px 13px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.form-row textarea { min-height: 150px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 107, 95, .14);
}
.form-row .field-error { margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-radius: var(--r-md);
  padding: 13px 15px;
  margin-bottom: 18px;
  font-size: .94rem;
  border: 1px solid;
}
.alert-success { background: var(--brand-tint); border-color: #cbe4dd; color: var(--brand-dark); }
.alert-error { background: #fdf2f2; border-color: #f3d3d4; color: var(--danger); }
.alert p { margin: 0; }

.contact-aside {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: .92rem;
  color: var(--ink-2);
}
.contact-aside p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 28px 0 18px;
  margin-top: 10px;
}
.footer-inner {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}
.footer-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; }
.footer-name .brand-join { color: var(--muted); font-weight: 500; font-size: .8em; padding: 0 .06em; }
.footer-brand p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; max-width: 46ch; }

.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.footer-nav h2 { font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: .5rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.footer-nav a { font-size: .92rem; color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--brand); text-decoration: underline; }

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 14px;
}
.footer-legal p { margin: 0; font-size: .82rem; color: var(--muted); }

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.authorbox-id img {
    width: 18px !important;
}

.faq summary h3{
margin:10px 0 !important;
}
.ad-slot {
    display: none;
visibility: hidden;
}