/**
 * Engineer Tsai full-site visual adapter v0.1.0
 * Scope: body.etvs only. Homepage and Practice Lab never receive this class.
 */

body.etvs {
  --etvs-ink: #06182e;
  --etvs-ink-deep: #04101f;
  --etvs-ink-raised: #0b2335;
  --etvs-paper: #f4f0e8;
  --etvs-paper-raised: #fffdf8;
  --etvs-paper-muted: #e9e4da;
  --etvs-text: #0a1b2c;
  --etvs-muted: #66727d;
  --etvs-line: rgba(6, 24, 46, 0.16);
  --etvs-line-dark: rgba(142, 185, 205, 0.24);
  --etvs-cyan: #62d7e5;
  --etvs-blue: #1768f2;
  --etvs-copper: #dc7d4f;
  --etvs-gold: #d7b45b;
  --etvs-success: #147556;
  --etvs-danger: #b54136;
  --etvs-sans: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --etvs-display: "Iowan Old Style", Baskerville, "Noto Serif TC", "Times New Roman", serif;
  --etvs-shadow: 0 24px 70px rgba(1, 14, 29, 0.22);
  background: var(--etvs-ink-deep);
  color: var(--etvs-text);
  font-family: var(--etvs-sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.etvs :where(*, *::before, *::after) { box-sizing: border-box; }
body.etvs :where(button, input, select, textarea) { font: inherit; }
body.etvs :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--etvs-cyan);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(98, 215, 229, 0.28);
}

body.etvs .et-header {
  background: rgba(4, 16, 31, 0.94);
  border-bottom-color: var(--etvs-line-dark);
  font-family: var(--etvs-sans);
}

body.etvs .et-hero h1,
body.etvs .et-paper :where(h1, h2),
body.etvs .entry-content :where(h1, h2),
body.etvs .woocommerce :where(.product_title, .woocommerce-products-header__title),
body.etvs :where(#bbpress-forums, .wpforo-main) h1,
body.etvs :where(#bbpress-forums, .wpforo-main) h2 {
  font-family: var(--etvs-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

body.etvs .et-hero h1 { font-size: clamp(2rem, 4vw, 4.25rem); }
body.etvs .et-hero .et-lead { color: #c8d5df; font-size: clamp(1rem, 1.8vw, 1.18rem); }

body.etvs .et-paper,
body.etvs .site-main > article,
body.etvs .entry-content > .wp-block-group,
body.etvs .woocommerce-notices-wrapper + .woocommerce {
  background: var(--etvs-paper-raised);
  border: 1px solid var(--etvs-line);
  border-radius: 1.25rem;
  box-shadow: var(--etvs-shadow);
}

body.etvs .et-paper { padding: clamp(1.2rem, 4vw, 3rem); }
body.etvs .et-paper :where(p, li) { color: #243443; }
body.etvs .et-paper :where(h2, h3) { color: var(--etvs-ink); margin-top: 1.7em; }
body.etvs .et-paper h2::before {
  background: var(--etvs-copper);
  content: "";
  display: inline-block;
  height: 0.78em;
  margin-inline-end: 0.55rem;
  width: 3px;
}

body.etvs .et-paper :where(a:not(.button):not(.wp-element-button)) {
  color: #0759d5;
  text-decoration-color: rgba(7, 89, 213, 0.35);
  text-underline-offset: 0.18em;
}

body.etvs :where(.button, button.button, .wp-element-button, .wp-block-button__link, input[type="submit"]),
body.etvs .woocommerce :where(a.button, button.button, input.button),
body.etvs .wc-block-components-button {
  align-items: center;
  background: var(--etvs-blue);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 3rem;
  padding: 0.72rem 1.35rem;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

body.etvs :where(.button, button.button, .wp-element-button, .wp-block-button__link, input[type="submit"]):hover,
body.etvs .woocommerce :where(a.button, button.button, input.button):hover,
body.etvs .wc-block-components-button:hover { filter: brightness(1.06); transform: translateY(-1px); }

body.etvs .et-paper :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea),
body.etvs .woocommerce :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea),
body.etvs :where(#bbpress-forums, .wpforo-main) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea) {
  background: #fff;
  border: 1px solid #a8b1b8;
  border-radius: 0.7rem;
  color: var(--etvs-text);
  min-height: 2.85rem;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

body.etvs .et-paper :where(label, legend),
body.etvs .woocommerce :where(label, legend) { color: var(--etvs-ink); font-weight: 700; }

body.etvs .et-paper :where(table, .wp-block-table table),
body.etvs .woocommerce table.shop_table,
body.etvs :where(#bbpress-forums, .wpforo-main) table {
  border: 1px solid var(--etvs-line);
  border-collapse: separate;
  border-radius: 0.85rem;
  border-spacing: 0;
  overflow: hidden;
  width: 100%;
}

body.etvs .et-paper :where(th, td),
body.etvs .woocommerce table.shop_table :where(th, td),
body.etvs :where(#bbpress-forums, .wpforo-main) :where(th, td) {
  border-bottom: 1px solid var(--etvs-line);
  padding: 0.85rem 1rem;
  text-align: start;
}

body.etvs .et-paper th,
body.etvs .woocommerce table.shop_table th,
body.etvs :where(#bbpress-forums, .wpforo-main) th { background: var(--etvs-paper-muted); color: var(--etvs-ink); }

body.etvs--article .et-paper,
body.etvs--standard .et-paper { max-width: 920px; }

body.etvs--listing :where(.et-card, .wp-block-post, article),
body.etvs--shop .woocommerce ul.products li.product,
body.etvs--product .woocommerce div.product,
body.etvs--community :where(#bbpress-forums, .wpforo-main),
body.etvs--member .et-paper > :where(div, section) {
  border-color: var(--etvs-line);
  border-radius: 1rem;
}

body.etvs--tool .et-paper :where(form, .calculator, [class*="calculator"], [class*="tool-"]) {
  background: var(--etvs-paper);
  border: 1px solid var(--etvs-line);
  border-radius: 1rem;
  padding: clamp(1rem, 3vw, 1.75rem);
}

body.etvs .woocommerce :where(.price, .amount) { color: var(--etvs-ink); font-weight: 800; }
body.etvs .woocommerce :where(.woocommerce-message, .woocommerce-info) {
  background: #e9f7f6;
  border: 1px solid rgba(20, 117, 86, 0.28);
  border-radius: 0.85rem;
  color: #0d503c;
  padding: 0.9rem 1rem;
}
body.etvs .woocommerce .woocommerce-error {
  background: #fff0ed;
  border: 1px solid rgba(181, 65, 54, 0.3);
  border-radius: 0.85rem;
  color: #7b2a24;
  padding: 0.9rem 1rem;
}

body.etvs :where(.wc-block-cart, .wc-block-checkout, .woocommerce-cart-form, .woocommerce-checkout, .woocommerce-MyAccount-content),
body.etvs--account .woocommerce-MyAccount-navigation,
body.etvs--member :where(.etos-member, .et-member-card, [class*="member-"]) {
  background: var(--etvs-paper-raised);
  border: 1px solid var(--etvs-line);
  border-radius: 1rem;
  color: var(--etvs-text);
}

body.etvs--account .woocommerce-MyAccount-navigation { padding: 0.75rem; }
body.etvs--account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
body.etvs--account .woocommerce-MyAccount-navigation a {
  border-radius: 0.65rem;
  color: var(--etvs-ink);
  display: block;
  font-weight: 750;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
}
body.etvs--account .woocommerce-MyAccount-navigation .is-active a { background: var(--etvs-ink); color: #fff; }

body.etvs--community :where(#bbpress-forums, .wpforo-main) {
  background: var(--etvs-paper-raised);
  color: var(--etvs-text);
  padding: clamp(1rem, 3vw, 2rem);
}

body.etvs .et-footer { background: var(--etvs-ink-deep); border-top-color: var(--etvs-line-dark); }

@media (max-width: 720px) {
  body.etvs .et-paper { border-radius: 0.9rem; padding: 1.15rem; }
  body.etvs .et-hero h1 { font-size: clamp(1.85rem, 10vw, 3rem); }
  body.etvs .et-paper :where(table, .wp-block-table),
  body.etvs .woocommerce :where(.shop_table, .woocommerce-cart-form),
  body.etvs :where(#bbpress-forums, .wpforo-main) table { display: block; max-width: 100%; overflow-x: auto; }
  body.etvs :where(.wc-block-cart, .wc-block-checkout) { padding: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.etvs *, body.etvs *::before, body.etvs *::after { scroll-behavior: auto !important; transition: none !important; }
}

