:root {
  --ink: #14130F;
  --bg: #FBFBEE;
  --card-bg: #FFFFFF;
  --border: #E6E4D9;
  --border-focus: #14130F;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft: #EFF6FF;
  --green: #10B981;
  --green-soft: #ECFDF5;
  --yellow: #F59E0B;
  --yellow-soft: #FFFBEB;
  --red: #EF4444;
  --red-soft: #FEF2F2;
  --text-muted: #6B7280;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 4px rgba(20, 19, 15, 0.04);
  --shadow-md: 0 6px 18px rgba(20, 19, 15, 0.06);
  --font-sans: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.back-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: opacity 0.15s ease;
}

.back-link:hover {
  opacity: 0.7;
}

.bna-rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-soft);
  border: 1px solid #BFDBFE;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.rate-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.rate-label {
  color: var(--text-muted);
}

/* Main */
.app-container {
  padding-top: 2rem;
  padding-bottom: 3rem;
  flex: 1;
}

.app-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.25rem;
}

.hero-badge {
  display: inline-block;
  background: #14130F;
  color: #FBFBEE;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.app-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Cards & Layout */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* Transport Buttons */
.transport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.transport-btn {
  background: #FAFAFA;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 0.15s ease;
  font-family: inherit;
}

.transport-btn:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}

.transport-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.transport-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.transport-meta {
  display: flex;
  flex-direction: column;
}

.transport-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.transport-detail {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.transport-allowance {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

/* Counters */
.counter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.counter-box {
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
}

.counter-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.counter-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #FFF;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.35rem;
}

.cnt-btn {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background 0.12s;
}

.cnt-btn:hover {
  background: #F3F4F6;
}

.cnt-input {
  width: 32px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  outline: none;
}

.counter-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-family: var(--font-mono);
}

/* Exemptions Box */
.exemption-box {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.exemption-header {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.shield-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.exemption-header strong {
  font-size: 0.92rem;
  display: block;
}

.exemption-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  margin-top: 0.45rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-row input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* Free shop toggle */
.free-shop-section {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.switch-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: 0.2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.free-shop-input-wrap {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #FCD34D;
}

/* Purchases & Items */
.purchases-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.btn-secondary-sm {
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-secondary-sm:hover {
  opacity: 0.85;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
}

.item-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.item-name-input {
  flex: 2;
}

.item-price-wrap {
  flex: 1.2;
}

.btn-del-item {
  background: #FEE2E2;
  color: #DC2626;
  border: none;
  width: 32px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}

.btn-del-item:hover {
  background: #FCA5A5;
}

.quick-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.direct-total-wrap {
  width: 130px;
}

.input-currency-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-prefix {
  position: absolute;
  left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFF;
  color: var(--ink);
  outline: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.form-input-text {
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFF;
  outline: none;
  transition: border-color 0.15s;
}

.form-input-text:focus {
  border-color: var(--border-focus);
}

/* Suitcase Visualizer */
.suitcase-visualizer {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.luggage-box {
  width: 100%;
  max-width: 380px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.luggage-handle {
  width: 90px;
  height: 28px;
  border: 5px solid var(--ink);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  margin-bottom: -2px;
  z-index: 1;
}

.luggage-body {
  width: 100%;
  height: 160px;
  background: #F1F5F9;
  border: 4px solid var(--ink);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.luggage-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  top: 0;
  width: 0%;
  background: linear-gradient(90deg, #60A5FA, #2563EB);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
  opacity: 0.25;
}

.luggage-box.warning .luggage-fill {
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
  opacity: 0.35;
}

.luggage-box.danger .luggage-fill {
  background: linear-gradient(90deg, #F87171, #EF4444);
  opacity: 0.45;
}

.luggage-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.semaphore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-soft);
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.semaphore-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.luggage-box.warning .semaphore-badge {
  background: var(--yellow-soft);
  color: #92400E;
  border-color: #FDE68A;
}

.luggage-box.warning .semaphore-dot {
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

.luggage-box.danger .semaphore-badge {
  background: var(--red-soft);
  color: #991B1B;
  border-color: #FECACA;
}

.luggage-box.danger .semaphore-dot {
  background: var(--red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.luggage-meter-text {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.meter-divider {
  color: var(--text-muted);
  margin: 0 0.2rem;
  font-weight: 400;
}

.luggage-percent {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.luggage-wheels {
  width: 80%;
  display: flex;
  justify-content: space-around;
  margin-top: -3px;
}

.wheel {
  width: 22px;
  height: 14px;
  background: var(--ink);
  border-radius: 6px;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.result-tile {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.result-tile.primary {
  grid-column: 1 / -1;
  background: #14130F;
  color: #FBFBEE;
  border-color: #14130F;
}

.result-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
  margin-bottom: 0.35rem;
}

.result-value-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.result-main-val {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.result-ars-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  opacity: 0.85;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.result-sub-detail {
  font-size: 0.82rem;
  opacity: 0.75;
  margin-top: 0.3rem;
}

.result-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.result-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Advice Card */
.advice-card {
  background: var(--green-soft);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s;
}

.advice-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: #065F46;
}

.advice-card p {
  font-size: 0.85rem;
  color: #047857;
  line-height: 1.4;
}

.advice-card.warning {
  background: var(--yellow-soft);
  border-color: #FDE68A;
}

.advice-card.warning h3 {
  color: #92400E;
}

.advice-card.warning p {
  color: #B45309;
}

.advice-card.danger {
  background: var(--red-soft);
  border-color: #FECACA;
}

.advice-card.danger h3 {
  color: #991B1B;
}

.advice-card.danger p {
  color: #B91C1C;
}

/* Actions */
.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-print {
  flex: 2;
  background: var(--accent);
  color: #FFF;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-print:hover {
  background: var(--accent-hover);
}

.btn-reset {
  flex: 1;
  background: #F1F5F9;
  color: var(--ink);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-reset:hover {
  background: #E2E8F0;
}

/* Guide Card */
.guide-card, .faq-card, .interlink-card {
  margin-bottom: 2rem;
}

.guide-card h2, .faq-card h2, .interlink-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.guide-item {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.guide-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.guide-item p {
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.45;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #FAFAFA;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background 0.15s;
}

.faq-item summary:hover {
  background: #F1F5F9;
}

.faq-answer {
  padding: 0.5rem 1.25rem 1.25rem;
  font-size: 0.88rem;
  color: #4B5563;
  line-height: 1.5;
}

/* Interlinking */
.interlink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.interlink-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s ease;
}

.interlink-item:hover {
  background: #FFF;
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.interlink-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.interlink-text {
  display: flex;
  flex-direction: column;
}

.interlink-text strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.interlink-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-contact {
  margin-bottom: 0.35rem;
}

.footer-contact a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.78rem;
  opacity: 0.8;
}

/* Print Styles */
.print-only {
  display: none;
}

@media print {
  body {
    background: #FFF;
    color: #000;
  }
  .site-header, .app-hero, .calculator-grid, .guide-card, .faq-card, .interlink-card, .site-footer {
    display: none !important;
  }
  .print-only {
    display: block !important;
    padding: 2rem;
    font-family: var(--font-sans);
  }
  .print-header {
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
  .print-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
  }
  .print-table th, .print-table td {
    border: 1px solid #CCC;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-size: 0.85rem;
  }
  .print-table th {
    background: #F3F4F6;
    font-weight: 700;
  }
  .print-total-row {
    font-weight: 800;
    background: #FAFAFA;
  }
  .print-footer-notice {
    font-size: 0.75rem;
    color: #555;
    border-top: 1px dashed #AAA;
    padding-top: 0.85rem;
  }
}
