:root {
  --bg: #eef7f9;
  --bg-strong: #e6f0f4;
  --surface: #ffffff;
  --surface-alt: #f8fbfd;
  --panel-border: #d9e8ee;
  --panel-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --primary: #1ea7b8;
  --primary-dark: #118da1;
  --primary-soft: #dff7fb;
  --text: #0f172a;
  --muted: #5b6b7a;
  --muted-strong: #334155;
  --success: #0f766e;
  --warning-bg: #fff8db;
  --warning-text: #7a5a00;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg) 0%, #f7fafc 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px 40px;
}

.page-shell {
  width: min(1180px, 100%);
}

.site-header {
  margin-bottom: 18px;
}

.utility-banner {
  background: #edf2f7;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.header-inner {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(217, 232, 238, 0.8);
  border-radius: var(--radius-lg);
  padding: 20px 22px 18px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-dark);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.7fr);
  gap: 22px;
  align-items: start;
}

.workspace.single-column {
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--panel-shadow);
}

.app-panel {
  padding: 24px;
}

.calc-form {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 700;
}

input {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus {
  outline: none;
  border-color: rgba(30, 167, 184, 0.8);
  box-shadow: 0 0 0 4px rgba(30, 167, 184, 0.12);
  background: #fff;
}

button {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(17, 141, 161, 0.2);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17, 141, 161, 0.25);
}

button:active {
  transform: translateY(0);
}

.result-card {
  background: linear-gradient(180deg, var(--surface-alt) 0%, #f0f8fb 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  color: var(--muted-strong);
  line-height: 1.8;
  padding: 18px 18px 16px;
  min-height: 130px;
  font-size: 0.98rem;
}

.result-card strong {
  color: var(--text);
}

.info-panel {
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.panel-label {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.info-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted-strong);
  line-height: 1.8;
}

.info-panel li + li {
  margin-top: 4px;
}

/* result table: UTC and Local columns */
.result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;
  font: inherit;
}
.result-table thead th {
  text-align: left;
  padding: 8px 6px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}
.result-table td {
  vertical-align: top;
  padding: 10px 12px;
  font: inherit;
  color: var(--muted-strong);
}
.result-table .mono,
.result-table .label-cell,
.result-table .diff-cell,
.result-table .small {
  font: inherit;
}
.result-table .mono {
  color: var(--muted-strong);
}
.result-table .small {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.85rem;
  color: var(--muted);
}
.result-table .label-cell {
  width: 8%;
  min-width: 42px;
  white-space: nowrap;
  font-weight: 700;
}
.result-table tbody td:nth-child(2) {
  background: linear-gradient(90deg, rgba(230,240,245,0.6), rgba(255,255,255,0));
  border-right: 1px solid var(--panel-border);
  padding-right: 18px;
  width: 46%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-table tbody td:nth-child(3) {
  padding-left: 18px;
  width: 46%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-table .diff-cell {
  white-space: nowrap;
}

@media (max-width: 640px) {
  /* stack rows on small screens with clear labels */
  .result-table, .result-table thead, .result-table tbody, .result-table th, .result-table td, .result-table tr { display: block; }
  .result-table thead { display: none; }
  .result-table tr { margin-bottom: 12px; border: none; }
  .result-table td { padding: 8px 6px; }
  .result-table .label-cell { width: auto; white-space: normal; }
  .result-table tbody td:nth-child(2),
  .result-table tbody td:nth-child(3),
  .result-table .diff-cell { width: auto; white-space: normal; overflow: visible; text-overflow: initial; }
}

@media (max-width: 800px) {
  body {
    padding: 18px 12px 28px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .app-panel,
  .info-panel {
    padding: 18px;
  }

  .header-inner {
    padding: 18px 16px;
  }
}
