:root {
  --bg: #081019;
  --panel: #111c28;
  --panel-2: #162434;
  --line: #2b3d51;
  --line-soft: #37506a;
  --text: #e4edf7;
  --muted: #91a4b8;
  --accent: #74c0fc;
  --accent-2: #4dabf7;
  --ok: #51cf66;
  --warn: #ff922b;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(116, 192, 252, 0.22), transparent 60%),
    linear-gradient(180deg, #0a1420 0%, #05090e 100%);
  background-attachment: fixed, fixed;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 16px 44px;
  position: relative;
  z-index: 1;
}

.page-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.logo-control {
  flex: 0 0 auto;
}

.site-logo {
  height: 148px;
  width: auto;
  max-width: 56vw;
  display: block;
}

@media (max-width: 520px) {
  .site-logo {
    height: 108px;
  }
}

.language-control {
  width: min(320px, 100%);
  margin-left: auto;
  flex: 0 1 320px;
}

.hidden-translate {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}

.hero,
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.hero {
  padding: 24px;
  margin-bottom: 18px;
  border-top: 2px solid rgba(116, 192, 252, 0.42);
}

h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.3rem);
  color: var(--accent);
  letter-spacing: 0.03em;
}

.sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 20px;
}

.card-title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1825;
  color: var(--text);
  font-size: 0.98rem;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.22);
  background: #0f1d2c;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 520px) {
  .summary {
    grid-template-columns: 1fr;
  }
}

.tile {
  background: linear-gradient(
    180deg,
    rgba(9, 20, 33, 0.82),
    rgba(8, 16, 25, 0.7)
  );
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tile-full {
  grid-column: span 2;
}

.tile-key {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tile-value {
  margin-top: 6px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

.ok {
  color: var(--ok);
}

.warn {
  color: var(--warn);
}

.details {
  background: rgba(8, 16, 25, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.row:first-child {
  border-top: none;
}

.row-key {
  color: var(--muted);
}

.row-value {
  font-weight: 700;
}

.table-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 16, 25, 0.72);
  padding: 12px;
}

#costLevelSelect {
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
  background: rgba(8, 16, 25, 0.65);
}

th,
td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
}

th {
  border-top: none;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #0d1722;
}

td:last-child,
th:last-child {
  text-align: right;
}

tr.active td {
  background: rgba(116, 192, 252, 0.12);
}

.footnote {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.mine-list {
  display: grid;
  gap: 10px;
}

.mine-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.mine-output {
  min-width: 92px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1825;
  color: var(--accent);
  font-weight: 700;
  text-align: right;
}

.mine-total {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 16, 25, 0.75);
}

.mine-total-key {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mine-total-value {
  margin-top: 6px;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--accent);
}

@media (max-width: 520px) {
  .hero,
  .card {
    border-radius: 14px;
  }

  .card {
    padding: 16px;
  }

  .tile-full {
    grid-column: auto;
  }
}

/* Hide Google Translate top bar/overlays */
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
#goog-gt-tt {
  display: none !important;
}

body {
  top: 0 !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}
