:root {
  --paper:    #F6F1E7;
  --surface:  #FFFDF8;
  --ink:      #23201B;
  --muted:    #8C8479;
  --line:     #E7DECC;
  --green:    #1C4B3A;
  --green-700:#163C2E;
  --terracotta:#BC5B3C;
  --terracotta-tint:#FBEEE8;
  --green-tint:#E9F0EB;
  --ochre:    #C9A24B;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(35, 32, 27, 0.05);
  --shadow-md: 0 2px 6px rgba(35, 32, 27, 0.06), 0 1px 2px rgba(35, 32, 27, 0.05);
  --shadow-lift: 0 8px 22px rgba(35, 32, 27, 0.10), 0 2px 6px rgba(35, 32, 27, 0.06);

  --sans: "Hanken Grotesk", ui-sans-serif, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

/* The [hidden] attribute must win over our display:flex/grid rules. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain — layered radial gradients over a faint noise tint */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(201,162,75,0.06), transparent 55%),
    radial-gradient(120% 90% at 92% 96%, rgba(28,75,58,0.05), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

a { color: var(--green); }

/* ───────────────────────── Shell ───────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ───────────────────────── Sidebar ───────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 24px;
  background: linear-gradient(180deg, var(--surface), #FCF8EF);
  border-right: 1px solid var(--line);
}

.brand { margin-bottom: 36px; }

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  color: var(--ink);
}

.glyph {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.glyph-it { color: var(--terracotta); }
.glyph-en { color: var(--green); }
.glyph-swap { color: var(--muted); font-size: 0.85rem; }

.tagline {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 10px 12px 10px 16px;
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--terracotta);
  transition: transform 0.18s ease;
}
.nav-label {
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
}
.nav-item:hover { color: var(--ink); background: rgba(35,32,27,0.035); }
.nav-item.active { color: var(--ink); background: rgba(188,91,60,0.07); }
.nav-item.active .nav-bar { transform: translateY(-50%) scaleY(1); }
.nav-item.active .nav-label { font-weight: 600; }

.sidebar-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(28,75,58,0.45);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(28,75,58,0.40); }
  70%  { box-shadow: 0 0 0 7px rgba(28,75,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(28,75,58,0); }
}

/* ───────────────────────── Panel ───────────────────────── */
.panel {
  padding: 48px 52px 72px;
  max-width: 980px;
  width: 100%;
}

.view-head { margin-bottom: 28px; }
.view-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.view-title {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 2.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.view-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 56ch;
}

/* small-caps style labels */
.card-kicker, .section-meta, .field label, .block-title,
.tx-meta, .fact-key, .call-row-status, .contact-role, .tx-legend span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ───────────────────────── Banners ───────────────────────── */
.banner {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  border: 1px solid;
}
.banner-ok {
  background: var(--green-tint);
  border-color: #C6D8CC;
  color: var(--green-700);
}
.banner-err {
  background: var(--terracotta-tint);
  border-color: #EAC9BC;
  color: #8E3F25;
}

.session-note {
  position: relative;
  z-index: 5;
  margin: 0;
  padding: 9px 16px;
  text-align: center;
  background: var(--terracotta-tint);
  border-bottom: 1px solid #EAC9BC;
  color: #8E3F25;
  font-size: 0.9rem;
}

/* ───────────────────────── Login overlay ───────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(201,162,75,0.08), transparent 55%),
    radial-gradient(120% 90% at 92% 96%, rgba(28,75,58,0.07), transparent 55%),
    var(--paper);
  animation: overlay-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px 34px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
  animation: card-rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: 0.05s;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--ochre) 55%, var(--green));
  opacity: 0.85;
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-brand .wordmark { font-size: 1.9rem; }

.login-lead {
  margin: -4px 0 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

.login-card .field label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}
.login-card .field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.login-card .field input::placeholder { color: #B6AD9E; letter-spacing: 0.12em; }
.login-card .field input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(28,75,58,0.13);
}

.login-error {
  margin: -6px 0 0;
  font-size: 0.88rem;
  color: #8E3F25;
}

.login-submit {
  align-self: stretch;
  justify-content: center;
  text-align: center;
  padding: 12px 20px;
  font-size: 1rem;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes card-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .login-overlay, .login-card { animation: none; }
}

/* ───────────────────────── Cards / generic ───────────────────────── */
.card-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
}
.card-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 34px 0 14px;
}
.section-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
}
.section-meta {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}

/* ───────────────────────── Dial card ───────────────────────── */
.dial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}
.dial-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--ochre) 55%, var(--green));
  opacity: 0.85;
}
.dial-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dial-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-grow { flex: 1 1 240px; }
.dial-form .field:not(.field-grow) { flex: 1 1 150px; }

.field label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}
.field .optional {
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.8;
}

.field input {
  width: 100%;
  padding: 11px 13px;
  font-size: 0.96rem;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.field input::placeholder { color: #B6AD9E; }
.field input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(28,75,58,0.13);
}
.field input.mono { font-family: var(--mono); letter-spacing: 0.01em; }
.big-number { font-size: 1.3rem !important; padding: 12px 14px; letter-spacing: 0.02em; }

/* ───────────────────────── Buttons ───────────────────────── */
button { font: inherit; cursor: pointer; }

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--green);
  color: #FBF7EE;
  border: none;
  border-radius: var(--r-sm);
  padding: 11px 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
  transition: background 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}
.btn-call:hover { background: var(--green-700); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-call:active { transform: translateY(0); }
.btn-call-lg { padding: 13px 26px; font-size: 1.02rem; flex: 0 0 auto; }

.phone-glyph {
  width: 15px; height: 15px;
  background: currentColor;
  -webkit-mask: var(--phone-mask) center / contain no-repeat;
  mask: var(--phone-mask) center / contain no-repeat;
  --phone-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.5.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.5.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E");
}

.btn-primary {
  align-self: flex-start;
  background: var(--green);
  color: #FBF7EE;
  border: none;
  border-radius: var(--r-sm);
  padding: 11px 20px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}
.btn-primary:hover { background: var(--green-700); transform: translateY(-1px); box-shadow: var(--shadow-lift); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.btn-ghost:hover { background: rgba(35,32,27,0.04); border-color: #D8CCB2; }

/* ───────────────────────── People grid (call view) ───────────────────────── */
.people-grid, .contacts-list, .calls-list { list-style: none; margin: 0; padding: 0; }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.person-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: #D8CCB2; }
.person-top { display: flex; flex-direction: column; gap: 3px; }
.person-name { font-weight: 600; font-size: 1.02rem; }
.person-phone { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); }
.person-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }

.contact-role {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--terracotta);
  background: var(--terracotta-tint);
  border: 1px solid #EAC9BC;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ───────────────────────── Add form ───────────────────────── */
.add-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 26px;
}
.add-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.add-form .field-wide { grid-column: 1 / -1; }
.add-form .btn-primary { grid-column: 1 / -1; }

/* ───────────────────────── Contacts list ───────────────────────── */
.contacts-list { display: flex; flex-direction: column; gap: 10px; }
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.contact:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: #D8CCB2; }
.contact-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; min-width: 0; }
.contact-name { font-weight: 600; }
.contact-phone { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); }
.contact-notes { flex-basis: 100%; font-size: 0.85rem; color: var(--muted); }
.contact-actions { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }

.btn-call-sm {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--green); color: #FBF7EE; border: none;
  border-radius: var(--r-sm); padding: 7px 15px; font-weight: 600; font-size: 0.86rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.14s ease, transform 0.12s ease;
}
.btn-call-sm:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-call-sm .phone-glyph { width: 13px; height: 13px; }

.btn-delete {
  background: transparent; color: var(--terracotta);
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 7px 12px; font-size: 0.86rem; font-weight: 500;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.btn-delete:hover { background: var(--terracotta-tint); border-color: #EAC9BC; }

/* ───────────────────────── Empty states ───────────────────────── */
.empty {
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  padding: 22px 4px;
  grid-column: 1 / -1;
}

/* ───────────────────────── History list ───────────────────────── */
.calls-list { display: flex; flex-direction: column; gap: 10px; }
.call-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.call-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); border-color: var(--green); }
.call-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.call-row-who { font-weight: 600; }
.call-row-when { color: var(--muted); font-size: 0.82rem; }

.call-row-status {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: #EFE8D8;
  color: var(--muted);
}
.call-row-status.status-completed { background: var(--green-tint); color: var(--green-700); }
.call-row-status.status-ringing,
.call-row-status.status-in-progress { background: var(--terracotta-tint); color: #8E3F25; }
.call-row-status.status-failed,
.call-row-status.status-no-answer { background: #F3E6E1; color: #8E3F25; }

/* ───────────────────────── Call detail ───────────────────────── */
.call-detail { display: flex; flex-direction: column; gap: 22px; }
.back-link {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--terracotta);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 0;
}
.back-link:hover { text-decoration: underline; }
.detail-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
}
.detail-meta { color: var(--muted); font-size: 0.88rem; margin-top: -16px; }

.detail-block { display: flex; flex-direction: column; gap: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; }
.block-title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

/* ───────────────────────── Key-facts card ───────────────────────── */
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 6px 22px;
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}
.fact-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.facts-grid .fact-row:nth-last-child(-n+2):nth-child(odd),
.facts-grid .fact-row:last-child { border-bottom: none; }
.fact-key { font-size: 0.64rem; font-weight: 600; color: var(--muted); }
.fact-value { font-size: 0.98rem; color: var(--ink); }
.fact-value.mono { font-family: var(--mono); }

.fact-list { padding: 16px 0; border-top: 1px solid var(--line); }
.fact-list:first-child { border-top: none; }
.fact-list .fact-key { display: block; margin-bottom: 8px; }
.fact-list ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.fact-list li { font-size: 0.94rem; }
.fact-list li::marker { color: var(--terracotta); }

.summary-empty {
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  padding: 18px 0;
  margin: 0;
}

/* ───────────────────────── Bilingual transcript ───────────────────────── */
.tx-legend { display: flex; gap: 14px; font-size: 0.62rem; font-weight: 600; }
.tx-legend-it { color: var(--terracotta); }
.tx-legend-en { color: var(--green); }

.transcript {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
}
/* center hairline rule between the two language columns */
.transcript.has-lines::before {
  content: "";
  position: absolute;
  top: 14px; bottom: 14px;
  left: 50%;
  width: 1px;
  background: var(--line);
}
.tx-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tx-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 22px;
}
.tx-cell.tx-empty { background: transparent; }
.tx-cell-it { border-left: 3px solid transparent; }
.tx-cell-en { border-left: 3px solid transparent; }
.tx-row.lang-it .tx-cell-it {
  background: var(--terracotta-tint);
  border-left-color: var(--terracotta);
}
.tx-row.lang-en .tx-cell-en {
  background: var(--green-tint);
  border-left-color: var(--green);
}
.tx-meta { font-size: 0.6rem; font-weight: 600; color: var(--muted); }
.tx-text { font-size: 0.95rem; color: var(--ink); }
.transcript .empty { padding: 22px; text-align: center; }

/* ───────────────────────── Reveal animation ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(var(--d, 0) * 80ms);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .dot { animation: none; }
  .btn-call:hover, .btn-primary:hover, .person-card:hover,
  .contact:hover, .call-row:hover { transform: none; }
}

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 16px 20px;
  }
  .brand { margin-bottom: 0; }
  .nav { flex-direction: row; gap: 4px; flex: 1 1 auto; }
  .nav-item { padding: 8px 12px; }
  .nav-bar { display: none; }
  .nav-item.active { background: var(--terracotta-tint); }
  .sidebar-foot { margin-top: 0; border-top: none; padding-top: 0; }
  .panel { padding: 28px 22px 56px; }
  .view-title { font-size: 1.7rem; }
  .add-form { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .facts-grid .fact-row:nth-last-child(-n+2):nth-child(odd) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .dial-form { flex-direction: column; align-items: stretch; }
  .btn-call-lg { justify-content: center; }
  /* stack transcript columns on very small screens */
  .tx-row { grid-template-columns: 1fr; }
  .transcript.has-lines::before { display: none; }
  .tx-cell.tx-empty { display: none; }
}
