/* =========================================================
   SwiftConvertHub — 2026 redesign layer ("technical sheet")
   Loaded after styles.css. Remove this file's <link> to revert.
   ========================================================= */

:root {
  --primary:        #1F5FA8;
  --primary-dark:   #174B86;
  --primary-light:  #4C84C7;
  --accent:         #1F5FA8;
  --accent-dark:    #174B86;
  --success:        #1F7A4D;
  --warning:        #8A6A00;
  --pink:           #1F5FA8;
  --highlight:      #FFD84D;
  --grid:           #E3E9F1;

  --bg:             #FFFFFF;
  --bg-alt:         #F7F9FC;
  --surface:        #FFFFFF;
  --surface-alt:    #F7F9FC;
  --border:         #DCE3EC;
  --border-strong:  #1D2329;

  --text:           #1D2329;
  --text-muted:     #5D6773;
  --text-light:     #6B7480;

  --shadow-sm:  none;
  --shadow-md:  0 1px 0 var(--border);
  --shadow-lg:  0 1px 0 var(--border);

  --radius-sm:  2px;
  --radius-md:  4px;
  --radius-lg:  6px;
  --radius-xl:  8px;

  --font:       'Archivo', system-ui, sans-serif;
  --font-head:  'Archivo', system-ui, sans-serif;
}

[data-theme="dark"] {
  --primary:        #7FB2F0;
  --primary-dark:   #5C97DE;
  --primary-light:  #A9CBF5;
  --accent:         #7FB2F0;
  --accent-dark:    #5C97DE;
  --success:        #6FD3A5;
  --warning:        #E8C25A;
  --pink:           #7FB2F0;
  --highlight:      #7A6416;
  --grid:           #1C242E;

  --bg:             #10151B;
  --bg-alt:         #161C23;
  --surface:        #161C23;
  --surface-alt:    #1B222B;
  --border:         #2A3440;
  --border-strong:  #5C6774;

  --text:           #E6EBF1;
  --text-muted:     #A3AEBB;
  --text-light:     #8C97A4;
}

body { font-family: var(--font); font-size: 17px; }
h1, h2, h3, h4 { font-family: var(--font-head); }

/* ---- Network bar + nav ---- */
.tsl-bar { background: #1D2329; color: #C7D0DB; font-size: 13px; }
.tsl-bar .container { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 8px; padding-bottom: 8px; }
.tsl-bar a { color: #C7D0DB; text-decoration: none; }
.tsl-bar a:hover { color: #FFFFFF; text-decoration: underline; }
.tsl-bar a[aria-current="true"] { color: #FFFFFF; font-weight: 600; }

.nav { background: var(--bg); border-bottom: 1px solid var(--border-strong); box-shadow: none; backdrop-filter: none; }
.nav-links a { color: var(--text); font-weight: 500; border-radius: 0; background: none; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: none; }
.theme-btn, .lang-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: 50%; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.lang-btn { border-radius: 4px; width: auto; padding: 0 12px; font-weight: 600; }
.theme-btn:hover { transform: none; background: var(--surface-alt); }
.theme-btn svg { width: 20px; height: 20px; }

/* ---- Remove decoration from the old template ---- */
.hero::before, .hero::after { display: none; }
.fade-up { animation: none; }
.section-label { display: none; }
.converter-card-accent { display: none; }
.card-icon { display: none; }
.cat-showcase { display: none; }

/* ---- New homepage hero: the converter ---- */
.sch-hero {
  background-color: var(--bg-alt);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--border-strong);
  overflow: hidden;
}
.sch-hero .container { max-width: 1100px; padding-top: 48px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 26px; }
.sch-hero h1 { margin: 0; font-size: 1.3rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.sch-tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--border-strong); background: var(--surface); width: fit-content; max-width: 100%; }
.sch-tabs button {
  font: 600 16px var(--font); min-height: 48px; padding: 0 20px; border: 0; border-right: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.sch-tabs button:last-child { border-right: 0; }
.sch-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.sch-conv { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 32px; }
.sch-lbl { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.sch-in { flex: 0 1 300px; min-width: 0; }
.sch-field { display: flex; align-items: baseline; gap: 10px; background: var(--surface); border: 1px solid var(--border-strong); padding: 6px 16px; }
.sch-field input {
  border: 0; outline: none; width: 100%; min-width: 0; background: transparent; color: var(--text);
  font: 700 3.4rem/1.1 var(--font); font-stretch: 70%; padding: 0;
}
.sch-field span { font-size: 1.35rem; font-weight: 600; color: var(--text-muted); }
.sch-eq { font-size: 2.4rem; color: var(--text-muted); padding-bottom: 18px; }
.sch-out { flex: 1 1 420px; min-width: 0; }
.sch-out output { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.sch-num {
  font-size: var(--num-size, clamp(3rem, 8vw, 7rem)); line-height: .95; white-space: nowrap; font-weight: 800; font-stretch: 62%; letter-spacing: -0.01em; color: var(--text);
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%); padding: 0 6px;
}
.sch-unit { font-size: 2rem; font-weight: 700; color: var(--primary); }
.sch-ruler { position: relative; height: 54px; border-top: 2px solid var(--text); margin-top: 6px; }
.sch-tick { position: absolute; top: 0; }
.sch-tick i { display: block; width: 2px; background: var(--text); transform: translateX(-1px); }
.sch-tick span { position: absolute; top: 22px; transform: translateX(-50%); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.sch-marker { position: absolute; top: -10px; width: 4px; height: 30px; background: var(--primary); transform: translateX(-2px); transition: left .2s ease; }
.sch-note { margin: 0; color: var(--text-muted); font-size: 15px; }
.sch-more { margin: 0; font-weight: 600; }
.sch-field input:focus, .sch-field input:focus-visible { outline: none; box-shadow: none; }
.sch-field:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }
.sch-tabs button:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }

/* ---- Converter sections: flat technical cards ---- */
.section-header h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; font-stretch: 70%; letter-spacing: 0; color: var(--text); }
.converter-card { border: 1px solid var(--border-strong); border-radius: 0; box-shadow: none; background: var(--surface); }
.converter-card:hover { box-shadow: none; transform: none; }
.card-title { font-weight: 700; }
.converter-field label { font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; }
.converter-field input, .converter-field select { border: 1px solid var(--border-strong); border-radius: 0; background: var(--surface); color: var(--text); min-height: 48px; font-family: var(--font); }
.converter-field input[readonly] { background: var(--surface-alt); font-weight: 700; }
.swap-btn { border-radius: 0; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); width: 44px; height: 44px; }
.swap-btn:hover { background: var(--surface-alt); transform: none; }
.quick-chip { border-radius: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--font); }
.quick-chip:hover { border-color: var(--border-strong); background: var(--surface-alt); }
.btn-primary { background: var(--text); color: var(--bg); border-radius: 2px; box-shadow: none; }
.btn-primary:hover { background: var(--primary); color: #FFFFFF; transform: none; box-shadow: none; }
.btn-secondary { border-radius: 2px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); }

/* ---- Factors table ---- */
.sch-factors { padding: 64px 0; }
.sch-factors .container { max-width: 1100px; }
.sch-factors-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; margin-bottom: 24px; }
.sch-factors h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; font-stretch: 70%; color: var(--text); }
.sch-factors-head p { margin: 0; color: var(--text-muted); max-width: 32em; }
.sch-table-wrap { overflow-x: auto; }
.sch-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.sch-table th { text-align: left; padding: 12px 16px; border-top: 2px solid var(--text); border-bottom: 1px solid var(--text); }
.sch-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.sch-table td:first-child, .sch-table th:first-child { padding-left: 0; }
.sch-table td:first-child { color: var(--text); font-weight: 600; }
.sch-table td:nth-child(2) { color: var(--text); font-stretch: 80%; font-size: 18px; }

/* ---- Feature / FAQ / blog / article: flat ---- */
.feature-card, .blog-card, .related-articles { border-radius: 0; box-shadow: none; border: 1px solid var(--border); background: var(--surface); }
.feature-card:hover, .blog-card:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }
.feature-icon { display: none; }
.blog-tag { border-radius: 2px; background: var(--surface-alt); color: var(--primary); }
.article-header { background: var(--bg-alt); border-bottom: 1px solid var(--border-strong); }
.article-header h1 { font-weight: 800; font-stretch: 75%; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.article-body { font-size: 1.05rem; }
.article-body h2 { font-weight: 800; font-stretch: 80%; font-size: 1.6rem; color: var(--text); }
.article-body p, .article-body li { color: var(--text); }
.footer { background: var(--bg-alt); border-top: 1px solid var(--border-strong); }

@media (max-width: 640px) {
  .sch-hero .container { padding-top: 32px; padding-bottom: 40px; }
  .sch-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .sch-tabs button { padding: 0 14px; font-size: 15px; flex: 0 0 auto; }
  .sch-eq { display: none; }
  .sch-field input { font-size: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) { .sch-marker { transition: none; } }
