:root {
  --primary: #255377;
  --secondary: #11746f;
  --accent: #22b3b3;
  --body: #475467;
  --black: #111111;
  --muted: #667085;
  --line: #d9e2ea;
  --surface: #ffffff;
  --background: #eef3f7;
  --soft: #f7f9fb;
  --danger: #9b2c2c;
  --shadow: 0 16px 42px rgba(26, 57, 82, .09);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--body);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--secondary); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(34, 179, 179, .34);
  outline-offset: 3px;
}

.site-header {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(30, 62, 88, .04);
}
.header-inner {
  width: min(1360px, calc(100% - 40px));
  height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand img {
  display: block;
  aspect-ratio: 2349 / 270;
  width: auto;
  height: 48px;
  max-width: min(420px, 62vw);
  object-fit: contain;
}
.header-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.header-actions > * { display: block; }
.main-site-link {
  color: var(--secondary);
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.main-site-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.page { width: 100%; padding: 42px 20px 76px; }
.portal-layout { width: min(1360px, 100%); margin-inline: auto; }
.calculator-column { min-width: 0; width: 100%; max-width: 1360px; margin-inline: auto; }
.hero { width: min(1144px, 100%); max-width: none; margin: 0 auto 26px; }
.eyebrow, .result-kicker {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1 { margin: 0 0 14px; color: var(--black); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; }
h2, h3, p { overflow-wrap: anywhere; }
.hero p:last-child { margin: 0; max-width: 760px; }
.notice, .error { margin: 18px 0; padding: 14px 18px; border-radius: 12px; }
.notice { border: 1px solid #e9cf84; background: #fff7dd; color: #674f10; }
.error { border: 1px solid #efb4b4; background: #fff1f1; color: var(--danger); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(680px, 760px) minmax(320px, 360px);
  justify-content: center;
  align-items: stretch;
  gap: 24px;
}
.dashboard-grid.result-catalogue-layout { grid-template-columns: minmax(0, .35fr) minmax(0, .65fr); width: 100%; }
.form-column, .result-column { min-width: 0; display: flex; }
.selection-form {
  width: 100%;
  margin: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.panel-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #e8f4f4;
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 800;
}
.panel-heading p { margin: 0; color: var(--secondary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.panel-heading h2 { margin: 2px 0 0; color: var(--black); font-size: 1.15rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
label { display: grid; gap: 7px; min-width: 0; color: #344054; font-size: .92rem; font-weight: 700; }
label span, small, .hint { color: var(--muted); font-weight: 500; }
.field-control { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field-control > input, .field-control > select { width: 100%; }
.field-error { color: var(--danger); font-weight: 700; }
.capacity-guidance { line-height: 1.35; }
.form-error-summary { grid-column: 1 / -1; margin: 0 0 18px; }
input, select, button {
  min-height: 46px;
  min-width: 0;
  border: 1px solid #cbd6e0;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  font: inherit;
}
input:hover, select:hover { border-color: #93a8ba; }
.hint { margin: 18px 0 14px; font-size: .84rem; }
button {
  border: 0;
  background: var(--secondary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 116, 111, .18);
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
button:hover { background: var(--accent); box-shadow: 0 10px 22px rgba(34, 179, 179, .24); transform: translateY(-1px); }
button:disabled { background: #98a2b3; box-shadow: none; cursor: not-allowed; }
.result-column { position: sticky; top: 22px; align-self: start; min-height: 100%; }
.result-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(37, 83, 119, .22);
  border-radius: 18px;
  background: var(--primary);
  box-shadow: 0 18px 48px rgba(20, 49, 73, .18);
  animation: result-enter 250ms ease-out both;
}
.result-hero { padding: 25px 24px 23px; color: #fff; }
.result-kicker { color: #bce7e5; }
.result-hero h2, .result-hero h3 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.06;
  overflow-wrap: anywhere;
}
.result-status { margin: 0; color: #cfdae3; font-size: .84rem; }
.motor-identity-label { margin: 0 0 4px; color: #bce7e5; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-hero .motor-manufacturer { margin: 0; font-size: clamp(1.625rem, 2.6vw, 1.875rem); font-weight: 700; line-height: 1.08; overflow-wrap: anywhere; word-break: break-word; }
.motor-model-label { margin-top: 13px; }
.result-hero .motor-model { color: #fff; font-size: clamp(1.25rem, 2vw, 1.375rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; word-break: break-word; }
.result-body { flex: 1; padding: 20px; border-radius: 16px 16px 0 0; background: #f7fafc; }
.motor-specs { display: grid; grid-template-columns: minmax(170px, 1.35fr) repeat(3, minmax(110px, 1fr)); gap: 9px; }
.motor-specs > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid #e1e8ee;
  border-radius: 10px;
  background: #fff;
}
.motor-specs span, .motor-specs strong { display: block; }
.motor-specs span { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; }
.motor-specs strong { overflow-wrap: anywhere; word-break: break-word; }
.motor-specs strong { margin-top: 3px; color: var(--black); font-size: .86rem; }
.result-contact { margin: 20px 0 0; padding: 16px; border: 1px solid #dbe7e7; border-radius: 12px; background: #f1f7f7; color: #405265; font-size: .82rem; line-height: 1.55; }
.result-contact a { color: var(--secondary); font-weight: 800; text-underline-offset: 3px; transition: color 200ms ease; }
.result-contact a:hover { color: var(--accent); }
.v31-result-card .result-hero { padding: 22px 24px; }
.v31-result-card .result-body { padding: 16px; }
.v31-result-card .motor-specs { gap: 7px; }
.v31-result-card .motor-specs > div { padding: 9px 10px; }
.v31-result-card .result-contact { margin-top: 14px; padding: 13px 14px; }
.result-input-card { width: 100%; height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.input-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 20px 0 0; }
.input-summary > div { min-width: 0; padding: 12px; border: 1px solid #e1e8ee; border-radius: 10px; background: #f8fafc; }
.input-summary dt { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.input-summary dd { margin: 4px 0 0; color: var(--black); font-size: .9rem; font-weight: 800; overflow-wrap: anywhere; }
.recommended-results { width: 100%; }
.recommended-heading { margin: 22px 0 10px; color: var(--primary); font-size: .78rem; font-weight: 850; letter-spacing: .12em; }
.calculation-result-summary { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.calculation-result-summary h2 { margin: 0 0 10px; color: var(--primary); font-size: .78rem; font-weight: 850; letter-spacing: .12em; }
.calculation-result-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.calculation-result-summary dl > div { min-width: 0; padding: 10px; border-radius: 9px; background: var(--soft); }
.calculation-result-summary dt { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.calculation-result-summary dd { margin: 3px 0 0; color: var(--black); font-size: .9rem; font-weight: 800; overflow-wrap: anywhere; }
.motor-card-list { display: flex; width: 100%; flex-direction: column; gap: 16px; }
.motor-card-list .motor-card { width: 100%; min-height: 0; flex: 0 0 auto; }
.result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; align-items: start; }
.result-action { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 12px; border: 1px solid #cad6df; border-radius: 9px; background: #fff; color: #405265; font: inherit; font-size: .78rem; font-weight: 800; text-align: center; text-decoration: none; }
.result-action-primary { border-color: var(--secondary); background: var(--secondary); color: #fff; }
.result-action-primary:hover { background: var(--accent); color: #fff; }
.result-action:disabled { cursor: not-allowed; opacity: .55; }
.offer-disclosure { min-width: 0; }
.offer-disclosure > summary { width: 100%; cursor: pointer; list-style: none; }
.offer-disclosure > summary::-webkit-details-marker { display: none; }
.offer-form { display: grid; grid-template-columns: 1fr; gap: 7px; width: min(520px, calc(100vw - 56px)); margin-top: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.offer-form h3 { margin: 0 0 5px; color: var(--primary); font-size: 1rem; line-height: 1.3; }
.offer-form input, .offer-form textarea { width: 100%; min-width: 0; }
.offer-form textarea { resize: vertical; border: 1px solid #cbd6e0; border-radius: 10px; padding: 11px 12px; font: inherit; }
.offer-privacy { margin: 6px 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.offer-status { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: .82rem; }
.offer-success { border: 1px solid #96d5c4; background: #edf9f5; color: #125c4e; }
.offer-error { border: 1px solid #efb4b4; background: #fff1f1; color: var(--danger); }
.alternatives, .disclaimer { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.alternatives ul { margin: 0; padding-left: 18px; }
.disclaimer { margin-bottom: 0; color: #5f6e81; font-size: .78rem; }
.engineering-trust { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: #6a7889; font-size: .66rem; font-weight: 700; line-height: 1.35; }
.engineering-trust span:first-child { color: var(--secondary); }
.empty-state { min-height: 190px; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; }
.empty-state span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #e3f3f2; color: var(--secondary); font-size: 1.3rem; font-weight: 800; }
.empty-state p { max-width: 260px; margin: 0; color: var(--muted); font-size: .86rem; }

.ad-rail { display: none; width: 300px; overflow: hidden; border-radius: 16px; background: transparent; }
.ad-rail a, .ad-rail img { display: block; width: 100%; }
.ad-rail img { height: auto; max-height: 600px; object-fit: contain; border-radius: 16px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding: 30px 20px 34px;
  background: #f8fafc;
  color: #98a2b3;
  text-align: center;
}
.site-footer p { max-width: 760px; margin: 0; overflow-wrap: anywhere; }
.site-footer .footer-kvkk { color: #667085; font-size: .82rem; }
.site-footer .footer-acknowledgement, .site-footer .footer-copyright { color: #98a2b3; font-size: 12px; }
.site-footer a { color: var(--secondary); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; transition: color 200ms ease; }
.site-footer a:hover { color: var(--accent); }
.site-footer a:focus-visible { border-radius: 3px; text-decoration: none; }

@keyframes result-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes summary-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1900px) {
  .portal-layout:has(.ad-rail) {
    width: min(2008px, 100%);
    display: grid;
    grid-template-columns: 300px minmax(0, 1360px) 300px;
    gap: 24px;
    align-items: start;
    justify-content: center;
  }
  .portal-layout:has(.ad-rail) .ad-rail { display: block; position: sticky; top: 22px; min-height: 600px; }
}

@media (max-width: 1180px) {
  .hero { width: min(760px, 100%); }
  .dashboard-grid, .dashboard-grid.result-catalogue-layout { width: 100%; max-width: 760px; margin-inline: auto; grid-template-columns: minmax(0, 1fr); }
  .result-column { position: static; }
  .ad-rail { display: none; }
}

@media (max-width: 900px) {
  .motor-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header-inner { width: calc(100% - 28px); height: 72px; gap: 12px; }
  .brand img { width: min(180px, 52vw); height: auto; max-width: none; max-height: 40px; }
  .header-actions { flex: 0 0 auto; }
  .main-site-link { font-size: .76rem; }
  .page { padding: 28px 14px 50px; }
  .hero { margin-bottom: 20px; }
  h1 { font-size: 2rem; }
  .dashboard-grid { display: block; width: 100%; max-width: 100%; }
  .form-column, .result-column, .selection-form { width: 100%; max-width: 100%; }
  .result-column { margin-top: 20px; }
  .selection-form { padding: 20px; border-radius: 16px; }
  .form-grid, .motor-specs, .input-summary, .result-actions, .calculation-result-summary dl { grid-template-columns: 1fr; }
  .result-card { border-radius: 16px; }
  .result-hero { padding: 22px 20px; }
  .result-hero h2, .result-hero h3 { font-size: 30px; }
  .result-hero .motor-manufacturer { font-size: clamp(1.5rem, 7vw, 1.75rem); }
  .result-hero .motor-model { font-size: clamp(1.125rem, 5.5vw, 1.3rem); }
  .result-body { padding: 17px; }
  .site-footer { padding: 28px 18px 32px; gap: 12px; }
  .ad-rail-right { display: block; width: min(300px, 100%); height: 250px; margin: 24px auto 0; }
  .ad-rail-right img { width: 100%; height: 250px; object-fit: cover; }
}

@media (prefers-reduced-motion: reduce) {
  .result-card { animation: none; }
}
