/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:        #2196f3;
  --blue-dark:   #1565c0;
  --blue-light:  #e3f2fd;
  --teal:        #26c6da;
  --teal-light:  #e0f7fa;
  --orange:      #ff7043;
  --green:       #43a047;
  --text:        #212121;
  --text-mid:    #555;
  --text-muted:  #888;
  --border:      #d0d0d0;
  --bg:          #f5f5f5;
  --white:       #ffffff;
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
  --radius:      6px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; overflow-x: hidden; }
main { overflow-x: hidden; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, #1976d2 0%, #26c6da 100%);
  color: white;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 960px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: white; }
.logo-icon { font-size: 1.8rem; }
.logo-title { font-size: 1.2rem; font-weight: 700; display: block; line-height: 1.2; }
.logo-sub { font-size: 0.72rem; opacity: 0.8; display: block; }
nav { display: flex; gap: 4px; height: 100%; align-items: center; }
nav a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 500;
  transition: background 0.15s;
}
nav a:hover { background: rgba(255,255,255,0.2); color: white; }
nav a.nav-register {
  background: rgba(255,255,255,0.22);
  border: 1.5px solid rgba(255,255,255,0.55);
  color: white; font-weight: 700;
}
nav a.nav-register:hover { background: rgba(255,255,255,0.38); }
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: 5px;
  background: rgba(255,255,255,0.22);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 12px;
}

/* ── Dropdown navigáció ── */
nav .nav-dropdown { position: relative; display: flex; align-items: center; height: 100%; }
nav .nav-dropdown > a::after { content: ' ▾'; font-size: .74em; }
nav .nav-dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  pointer-events: none;
}
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; border-radius: 9px; min-width: 195px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18); z-index: 9999;
  padding: 8px 0 6px; list-style: none; margin: 0;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
  display: block; padding: 10px 18px;
  color: #333 !important; font-size: .9rem; font-weight: 500;
  text-decoration: none; transition: background .15s; white-space: nowrap;
  background: none !important;
}
.nav-dropdown-menu li a:hover { background: #e3f2fd !important; color: #1565c0 !important; }
.nav-dropdown-menu li a.active-submenu { background: #e3f2fd !important; color: #1565c0 !important; font-weight: 700; }

/* ===== SECTIONS ===== */
section { padding: 40px 0; scroll-margin-top: 86px; }
.sec-alt { background: #fafafa; }
.sec-title {
  font-size: 1.4rem; font-weight: 700; color: var(--blue-dark);
  border-left: 4px solid var(--blue); padding-left: 12px;
  margin-bottom: 20px;
}
.sec-desc { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; text-align: center; }

/* ===== CALCULATOR LAYOUT ===== */
.calc-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
  align-items: start; margin-bottom: 24px;
}
@media (max-width: 680px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-info {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 18px;
  box-shadow: var(--shadow);
}
.calc-info p {
  font-size: 0.88rem; color: var(--text-mid); margin-bottom: 10px; line-height: 1.5;
}
.calc-info p:last-child { margin-bottom: 0; }
.calc-info strong { color: var(--blue-dark); }

.calc-form-wrap {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  /* no overflow:hidden — datepicker calendar must escape the box */
}

.calc-toolbar {
  display: flex; gap: 8px; padding: 10px 14px;
  background: #f0f0f0; border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  align-items: center; flex-wrap: wrap;
}
.cycle-group {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
}
.cycle-group label { font-size: 0.82rem; color: var(--text-mid); white-space: nowrap; }
.cycle-group .num-wrap .field-num { width: 46px; }
.btn-primary {
  background: var(--blue); color: white; border: none;
  padding: 7px 16px; border-radius: 4px; font-size: 0.85rem;
  font-weight: 600; cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-clear {
  background: #9e9e9e; color: white; border: none;
  padding: 7px 16px; border-radius: 4px; font-size: 0.85rem;
  font-weight: 600; cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.btn-clear:hover { background: #757575; }

.calc-rows { padding: 8px 0; }

.calc-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.calc-row:last-child { border-bottom: none; }
.sub-row { background: #fafafa; }

.row-num {
  font-size: 0.85rem; font-weight: 700; color: var(--blue);
  text-align: right; padding-right: 2px; min-width: 20px;
}
.calc-row label { font-size: 0.88rem; color: var(--text-mid); }

.row-fields { display: flex; gap: 6px; justify-content: flex-end; }

/* row 2: two num-wraps together = 140px (same as date field) */
.row-fields.two-col { width: 152px; }
.row-fields.two-col .num-wrap { flex: 1; display: flex; }
.row-fields.two-col .num-wrap .field-num { flex: 1; width: 0; min-width: 0; }

/* rows 5-6 and standalone: hét+nap pair = 140px total */
.row-fields.date-plus-two .num-wrap,
.row-fields.reach-row .num-wrap { flex: none; display: flex; width: 67px; }
.row-fields.date-plus-two .num-wrap .field-num,
.row-fields.reach-row .num-wrap .field-num { flex: 1; width: 0; min-width: 0; }

/* row 6: Hét + Nap + Dátum */
.row-fields.reach-row { display: flex; gap: 6px; align-items: center; }
.row-fields.reach-row .field-date { width: 152px; }

/* ===== NUM-WRAP: number input + suffix label ===== */
.num-wrap {
  display: inline-flex;
  align-items: stretch;
}
.num-wrap .field-num {
  width: 30px;
  border-radius: 4px 0 0 4px;
  border-right: none;
  text-align: center;
  padding: 6px 4px;
}
.field-suffix {
  display: flex;
  align-items: center;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: #f5f5f5;
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  user-select: none;
}

/* When the input is calculated (blue), suffix matches */
.num-wrap:has(.field-calc) .field-suffix {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-color: var(--border);
}
/* When readonly (row 5), the whole wrap is non-interactive */
.num-wrap:has([readonly]) {
  pointer-events: none;
  cursor: default;
}

.field-date, .field-num {
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 8px; font-size: 0.85rem; color: var(--text);
  background: white; outline: none; transition: border-color 0.15s;
}
.field-date:focus, .field-num:focus { border-color: var(--blue); }
.field-date { width: 152px; cursor: pointer; }
.field-num { width: 62px; text-align: center; }
.field-date[readonly] { background: white; color: var(--text); cursor: pointer; }

/* Calculated (output) field — always light blue */
.field-calc,
input.field-calc[readonly] {
  background: var(--blue-light) !important;
  color: var(--blue-dark) !important;
  cursor: default;
}
/* User-input (source) field stays white */
.field-input {
  background: white !important;
  color: var(--text) !important;
}

/* no spinner arrows on number inputs */
.no-spin::-webkit-outer-spin-button,
.no-spin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.no-spin { -moz-appearance: textfield; }

/* readonly number inputs (row 5 Hét/Nap) — not clickable */
.field-num[readonly] { pointer-events: none; cursor: default; }

/* ===== CUSTOM DATEPICKER ===== */
.datepicker-wrap { position: relative; display: inline-block; }

.dp-input { user-select: none; }
.dp-input::placeholder { color: #aaa; }

.dp-calendar {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;        /* open leftward so it stays within the card */
  z-index: 9999;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  width: 240px;
  font-size: 0.85rem;
  user-select: none;
}
.dp-calendar.open { display: block; }

.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--blue); color: white;
  padding: 8px 10px; border-radius: 4px 4px 0 0;
}
.dp-nav {
  background: none; border: none; color: white;
  font-size: 1rem; cursor: pointer; padding: 2px 6px;
  border-radius: 3px; line-height: 1;
  transition: background 0.15s;
}
.dp-nav:hover { background: rgba(255,255,255,0.25); }
.dp-month-year { font-weight: 700; font-size: 0.9rem; }

.dp-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  background: #e3f2fd; padding: 4px 6px 2px;
}
.dp-weekdays span {
  text-align: center; font-weight: 700; font-size: 0.75rem;
  color: var(--blue-dark); padding: 2px 0;
}

.dp-days {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 4px 6px 8px; gap: 1px;
}
.dp-day {
  text-align: center; padding: 5px 2px;
  border-radius: 3px; cursor: pointer;
  font-size: 0.82rem; color: var(--text);
  transition: background 0.1s;
  line-height: 1.4;
}
.dp-day:hover { background: var(--blue-light); color: var(--blue-dark); }
.dp-day.other-month { color: #ccc; }
.dp-day.disabled { color: #ddd; cursor: not-allowed; pointer-events: none; }
.dp-day.today { font-weight: 700; color: var(--blue); }
.dp-day.selected { background: var(--blue); color: white; border-radius: 3px; }
.dp-day.selected:hover { background: var(--blue-dark); }

.calc-divider { height: 1px; background: #e0e0e0; margin: 4px 14px; }

/* ===== RESULTS ===== */
.results-panel { margin-bottom: 28px; }
.hidden { display: none !important; }

.results-hero {
  background: linear-gradient(135deg, #1976d2 0%, #26c6da 100%);
  color: white; border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 16px;
}
.res-block { text-align: center; margin-bottom: 20px; }
.res-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.res-big { font-size: 2rem; font-weight: 800; margin: 4px 0; }
.res-sub { font-size: 0.9rem; opacity: 0.8; }

.res-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
@media (max-width: 560px) { .res-grid { grid-template-columns: repeat(2,1fr); } }
.res-box {
  background: rgba(255,255,255,0.18); border-radius: var(--radius);
  padding: 12px 8px; text-align: center;
}
.res-box-val { font-size: 1.3rem; font-weight: 800; }
.res-box-lbl { font-size: 0.72rem; opacity: 0.85; margin-top: 2px; }

/* PROGRESS */
.progress-wrap { margin-bottom: 20px; }
.progress-track {
  position: relative; height: 32px; background: #ddd;
  border-radius: 16px; overflow: hidden;
  display: flex; align-items: center;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #42a5f5, #1976d2, #7b1fa2);
  border-radius: 16px; transition: width 0.7s ease;
  min-width: 2%;
}
.p-lbl {
  position: absolute; font-size: 0.68rem; font-weight: 600;
  color: white; mix-blend-mode: difference; pointer-events: none;
}
.progress-marks {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-muted); margin-top: 4px;
  padding: 0 4px;
}

/* VIZSGALAT TABLE */
.panel-title {
  font-size: 1.05rem; font-weight: 700; color: var(--blue-dark);
  margin-bottom: 12px; padding: 10px 0 6px;
  border-bottom: 2px solid var(--blue-light);
}
.vt-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.vt-table th {
  background: var(--blue); color: white;
  padding: 8px 12px; text-align: left; font-weight: 600;
}
.vt-table td { padding: 8px 12px; border-bottom: 1px solid #eee; }
.vt-table tr:nth-child(even) td { background: #f5f9ff; }
.vt-past td { color: var(--text-muted); }
.vt-now td { background: #fff9c4 !important; font-weight: 600; }
.vt-date { white-space: nowrap; color: var(--blue-dark); font-weight: 600; }
.vt-week { color: var(--text-muted); font-size: 0.8rem; }

/* ===== STANDALONE ===== */
.standalone-wrap {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
  align-items: start;
}
@media (max-width: 680px) { .standalone-wrap { grid-template-columns: 1fr; } }
.standalone-info {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 18px;
  box-shadow: var(--shadow);
}
.standalone-info h3 { font-size: 1rem; color: var(--blue-dark); margin-bottom: 10px; }
.standalone-info p { font-size: 0.88rem; color: var(--text-mid); line-height: 1.5; }

/* ===== WEEKLY SECTION ===== */
.wk-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 24px;
}
.wk-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: white;
  font-size: 1rem; cursor: pointer; color: var(--blue);
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.wk-btn:hover { border-color: var(--blue); background: var(--blue-light); }
.wk-display { text-align: center; min-width: 90px; }
#wk-num { font-size: 2.6rem; font-weight: 800; color: var(--blue); line-height: 1; }
.wk-lbl { font-size: 1rem; color: var(--text-muted); font-weight: 600; }

.wk-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 560px) { .wk-grid { grid-template-columns: 1fr; } }
.wk-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 18px;
  box-shadow: var(--shadow);
}
.wk-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }

.baby-size-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--blue-light); border-radius: var(--radius);
  padding: 8px 12px; margin-bottom: 12px;
}
.bs-emoji { font-size: 1.6rem; }
.bs-label { font-size: 0.72rem; color: var(--text-muted); }
.bs-val { font-weight: 700; color: var(--blue-dark); font-size: 0.9rem; }

.fact-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.fact-list li {
  font-size: 0.88rem; color: var(--text-mid);
  padding-left: 16px; position: relative; line-height: 1.4;
}
.fact-list li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--blue); font-size: 0.7rem; top: 3px;
}

.wk-dots { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.wk-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--border); background: white;
  font-size: 0.62rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.15s;
}
.wk-dot:hover { border-color: var(--blue); color: var(--blue); }
.wk-dot.active { background: var(--blue); border-color: var(--blue); color: white; }
.wk-dot.t2.active { background: #8e24aa; border-color: #8e24aa; }
.wk-dot.t3.active { background: #00897b; border-color: #00897b; }
.wk-dot.t2 { border-color: #ce93d8; }
.wk-dot.t3 { border-color: #80cbc4; }

/* ===== CHECKUPS ===== */
#checkups-list { display: flex; flex-direction: column; gap: 10px; }
.cu-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 14px 16px;
  box-shadow: var(--shadow);
}
.cu-badge {
  background: var(--blue); color: white;
  border-radius: var(--radius); padding: 14px 0;
  text-align: center; font-weight: 700; font-size: 0.9rem;
  white-space: nowrap; flex-shrink: 0; line-height: 1.3;
  display: flex; align-items: center; justify-content: center;
  min-height: 54px; width: 140px;
}
.cu-badge.green { background: var(--green); }
.cu-content h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 3px; }
.cu-content p { font-size: 0.85rem; color: var(--text-muted); }
.cu-tag {
  display: inline-block; background: var(--blue-light); color: var(--blue-dark);
  border-radius: 10px; padding: 2px 8px; font-size: 0.72rem;
  font-weight: 600; margin-top: 5px;
}
.cu-tag.g { background: #e8f5e9; color: var(--green); }

/* ===== TIPS ===== */
.tips-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.tip-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 18px;
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.tip-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.tip-icon { font-size: 1.8rem; margin-bottom: 8px; }
.tip-card h4 { font-size: 0.92rem; font-weight: 700; margin-bottom: 6px; }
.tip-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }

/* ===== FOOTER ===== */
footer {
  background: #1565c0; color: white;
  text-align: center; padding: 24px 16px 220px;
}
footer p { font-size: 0.88rem; opacity: 0.9; margin-bottom: 4px; }
.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-links a {
  color: white;
  opacity: 0.92;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-links a:hover { opacity: 1; }

/* ===== LEGAL PAGES ===== */
.legal-page { padding: 40px 0 56px; }
.legal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--text);
}
.legal-card h2 {
  font-size: 1.08rem;
  color: var(--blue-dark);
  margin: 22px 0 10px;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card p,
.legal-card li {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.65;
}
.legal-card ul {
  padding-left: 1.2rem;
  margin: 8px 0 12px;
}
.legal-card a { color: var(--blue); }
.legal-note {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  color: var(--blue-dark);
  margin-bottom: 18px;
  padding: 12px 14px;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 0.9rem;
}
.legal-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  line-height: 1.55;
}
.legal-table td:first-child {
  width: 34%;
  font-weight: 700;
  color: var(--text-mid);
  background: #f8fbff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  body {
    width: 100%;
    max-width: 100vw;
  }
  .container,
  .header-inner {
    max-width: 100%;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }
  .header-inner {
    justify-content: space-between;
    position: relative;
  }
  .mobile-menu-toggle {
    display: flex;
    flex: 0 0 auto;
  }
  header nav {
    display: none;
  }
  header nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 10000;
  }
  header nav.is-open a {
    color: var(--text) !important;
    padding: 12px 14px;
    border-radius: 0;
    border-bottom: 1px solid #eef2f7;
    background: white !important;
  }
  header nav.is-open a:hover {
    background: var(--blue-light) !important;
    color: var(--blue-dark) !important;
  }
  header nav.is-open a.nav-register {
    border: 0;
    color: var(--blue-dark) !important;
    font-weight: 800;
  }
  header nav.is-open .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }
  header nav.is-open .nav-dropdown::after,
  header nav.is-open .nav-dropdown > a::after {
    content: none;
  }
  header nav.is-open .nav-dropdown > a {
    color: var(--blue-dark) !important;
    cursor: default !important;
    font-weight: 800;
  }
  header nav.is-open .nav-dropdown-menu {
    display: block;
    position: static;
    min-width: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background: #f8fbff;
  }
  header nav.is-open .nav-dropdown-menu li a {
    padding-left: 28px;
    white-space: normal;
    background: #f8fbff !important;
  }
  .logo-title { font-size: 1.08rem; }
  .logo-sub { font-size: 0.68rem; }

  .calc-info p { display: none; }
  .calc-info p:nth-child(2) {
    display: block;
    margin-bottom: 0;
  }
  .calc-info,
  .calc-form-wrap,
  .results-panel,
  .standalone-info,
  .wk-card,
  .cu-item,
  .tip-card,
  .legal-card {
    max-width: 100%;
  }

  .calc-toolbar {
    align-items: stretch;
    flex-direction: row;
    max-width: 100%;
  }
  .calc-toolbar .btn-primary,
  .calc-toolbar .btn-clear {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }
  .cycle-group {
    align-items: flex-start;
    flex: 0 0 100%;
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
  .cycle-group label {
    text-align: left;
  }

  .calc-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 4px;
  }
  .row-num {
    min-width: 0;
    text-align: left;
    padding-right: 0;
  }
  .calc-row label {
    justify-self: start;
    text-align: left;
  }
  .row-fields {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }
  .field-date { width: 136px; }
  .row-fields.two-col { width: 136px; }
  .row-fields.date-plus-two {
    flex-wrap: nowrap;
    max-width: 100%;
  }
  .row-fields.date-plus-two .field-date { width: 128px; }
  .row-fields.date-plus-two .num-wrap,
  .row-fields.reach-row .num-wrap { width: 60px; }
  .row-fields.reach-row .field-date { width: 128px; }
  .dp-calendar {
    left: 0;
    right: auto;
    max-width: calc(100vw - 24px);
  }
  .vt-table,
  .legal-table {
    table-layout: fixed;
    word-break: break-word;
  }
  .cu-item {
    flex-direction: column;
  }
  .cu-badge {
    width: 100%;
  }
}
