/* -----------------------------------------------
   MARKETLY SUPPORT PORTAL — main.css
   Brand: #123A2A (ink) / #B8F341 (lime) / #FCFBF8 (cream)
----------------------------------------------- */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-ink:          #123A2A;
  --color-ink-deep:     #082C20;
  --color-lime:         #B8F341;
  --color-lime-hover:   #A9E734;
  --color-page:         #FCFBF8;
  --color-surface:      #FFFFFF;
  --color-surface-soft: #F4F5EE;
  --color-surface-warm: #F7F3EA;
  --color-border:       #E6E7DF;
  --color-text:         #1D2420;
  --color-text-muted:   #657066;
  --color-text-soft:    #8A938B;
  --color-success:      #2D7D46;
  --color-error:        #E5563D;
  --color-warning:      #F0A12A;

  --font-heading:  'DM Sans', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-utility:  'IBM Plex Mono', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;

  --radius-sm:  0.375rem;
  --radius:     0.75rem;
  --radius-lg:  1.25rem;
  --radius-xl:  1.75rem;
  --radius-pill: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);

  --container:  1100px;
  --gutter:     1.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--color-ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Container */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* -----------------------------------------------
   HEADER
----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252,251,248,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-text);
}

.logo__name {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo__tag {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Header brand group */
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.header-brand__sep {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  font-weight: 400;
}

.header-brand__company {
  display: flex;
  align-items: center;
}

.header-brand__logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px 4px;
  box-shadow: 0 0 0 1px var(--color-border);
  opacity: 0.9;
  transition: opacity 150ms;
}
.header-brand__logo:hover { opacity: 1; }

/* Hero company badge */
.hero__company-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  padding: 0.375rem 0.875rem 0.375rem 0.5rem;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  font-size: var(--text-xs);
  font-weight: 500;
  margin-bottom: 1rem;
  transition: background 150ms, border-color 150ms;
}
.hero__company-badge:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.hero__company-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px 5px;
}

/* Footer company logo */
.footer-company-link {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-company-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  padding: 3px 6px;
  opacity: 0.85;
  transition: opacity 150ms;
}
.footer-company-logo:hover { opacity: 1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 150ms;
}
.nav-link:hover { color: var(--color-ink); }

/* -----------------------------------------------
   BUTTONS
----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 150ms, opacity 150ms, transform 100ms;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--color-ink);
  color: #fff;
}
.btn--primary:hover { background: var(--color-ink-deep); }

.btn--lime {
  background: var(--color-lime);
  color: var(--color-ink-deep);
}
.btn--lime:hover { background: var(--color-lime-hover); }

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-ink); background: var(--color-surface-soft); }

.btn--sm { padding: 0.5rem 1rem; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn--lg { padding: 1rem 2rem; font-size: var(--text-md); }
.btn--full { width: 100%; }

/* -----------------------------------------------
   HERO SECTION
----------------------------------------------- */
.hero {
  background: var(--color-ink-deep);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__deco svg { width: 100%; height: 100%; }

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(184,243,65,0.12);
  color: var(--color-lime);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(184,243,65,0.2);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero__title span { color: var(--color-lime); }

.hero__subtitle {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.65);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -----------------------------------------------
   FEATURES GRID
----------------------------------------------- */
.features {
  padding: 4rem 0;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 0.5rem;
  font-family: var(--font-utility);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 560px;
}

.features__header {
  text-align: center;
  margin-bottom: 3rem;
}
.features__header .section-desc { margin-inline: auto; }

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 200ms, transform 200ms;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-surface-soft);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  margin-bottom: 1rem;
}

.feature-card__title {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* -----------------------------------------------
   STATS BAR
----------------------------------------------- */
.stats-bar {
  background: var(--color-ink);
  padding: 2rem 0;
}

.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat__value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-lime);
  font-family: var(--font-utility);
}

.stat__label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  margin-top: 0.25rem;
}

/* -----------------------------------------------
   PAGE HEADER (inner pages)
----------------------------------------------- */
.page-header {
  background: var(--color-ink);
  padding: 3rem 0 2.5rem;
}

.page-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-lime);
  font-family: var(--font-utility);
  margin-bottom: 0.75rem;
}

.page-header__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.page-header__desc {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

/* -----------------------------------------------
   PAGE BODY
----------------------------------------------- */
.page-body { padding: 3rem 0 5rem; }

.page-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 640px) 1fr;
  gap: 2rem;
}

.page-grid__main { grid-column: 2; }

/* -----------------------------------------------
   CARD
----------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 1.5rem; }

.card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* -----------------------------------------------
   FORMS
----------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }

label, .form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-required { color: var(--color-error); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color 150ms, box-shadow 150ms;
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(18,58,42,0.08);
}

textarea { resize: vertical; min-height: 140px; }

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  margin-top: 0.375rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* File upload */
.file-upload {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  position: relative;
}
.file-upload:hover { border-color: var(--color-ink); background: var(--color-surface-soft); }
.file-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-upload__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  pointer-events: none;
}
.file-upload__label strong { color: var(--color-ink); }
.file-upload__list { margin-top: 0.75rem; text-align: left; }
.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 0.375rem 0;
  border-top: 1px solid var(--color-border);
}

/* -----------------------------------------------
   ALERTS / MESSAGES
----------------------------------------------- */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.alert--success { background: #E8F5EC; color: #1A5E30; border: 1px solid #A3D9B1; }
.alert--error   { background: #FDF0EE; color: #9B2318; border: 1px solid #F4B5AC; }
.alert--info    { background: #EBF3FF; color: #1A4888; border: 1px solid #A3C4F5; }
.alert--warning { background: #FEF8EE; color: #8A5A00; border: 1px solid #F5D98A; }

/* -----------------------------------------------
   BADGES
----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-utility);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--open     { background: #EBF3FF; color: #1A4888; }
.badge--progress { background: #FEF8EE; color: #8A5A00; }
.badge--resolved { background: #E8F5EC; color: #1A5E30; }
.badge--closed   { background: var(--color-surface-soft); color: var(--color-text-muted); }
.badge--urgent   { background: #FDF0EE; color: #9B2318; }
.badge--high     { background: #FFF4E8; color: #8A4000; }
.badge--normal   { background: var(--color-surface-soft); color: var(--color-text-muted); }
.badge--low      { background: #F0F5F0; color: #4A6B4A; }

/* -----------------------------------------------
   TICKET LIST
----------------------------------------------- */
.ticket-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  transition: box-shadow 150ms;
  text-decoration: none;
  color: inherit;
}
.ticket-card:hover { box-shadow: var(--shadow-md); }

.ticket-card__number {
  font-family: var(--font-utility);
  font-size: var(--text-xs);
  color: var(--color-text-soft);
}
.ticket-card__subject {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.ticket-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  margin-top: 0.25rem;
}
.ticket-card__badges { display: flex; gap: 0.375rem; flex-wrap: wrap; justify-content: flex-end; }

/* -----------------------------------------------
   TRACKING / TICKET DETAIL
----------------------------------------------- */
.ticket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.info-item__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-utility);
  margin-bottom: 0.25rem;
}

.info-item__value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.ticket-number-display {
  font-family: var(--font-utility);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: 0.04em;
}

/* Thread */
.thread { display: flex; flex-direction: column; gap: 1rem; }

.thread-message {
  border-radius: var(--radius);
  padding: 1.25rem;
}

.thread-message--customer {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
}

.thread-message--admin {
  background: var(--color-ink-deep);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
}

.thread-message__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  margin-bottom: 0.625rem;
  color: var(--color-text-muted);
}
.thread-message--admin .thread-message__meta { color: rgba(255,255,255,0.5); }

.thread-message__author {
  font-weight: 600;
  color: var(--color-text);
}
.thread-message--admin .thread-message__author { color: var(--color-lime); }

.thread-message__body { font-size: var(--text-sm); line-height: 1.7; }
.thread-message--admin .thread-message__body { color: rgba(255,255,255,0.85); }

/* -----------------------------------------------
   SEARCH & FILTER BAR (admin)
----------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-bar input,
.filter-bar select {
  width: auto;
  min-width: 160px;
}

/* -----------------------------------------------
   SUPPORT SCOPE NOTICE
----------------------------------------------- */
.support-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.support-scope__col {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.support-scope__col--yes {
  background: #E8F5EC;
  border: 1px solid #A3D9B1;
}

.support-scope__col--no {
  background: #FDF0EE;
  border: 1px solid #F4B5AC;
}

.support-scope__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.support-scope__col--yes .support-scope__title { color: #1A5E30; }
.support-scope__col--no  .support-scope__title { color: #9B2318; }

.support-scope__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.support-scope__col--yes .support-scope__icon { background: #2D7D46; color: #fff; }
.support-scope__col--no  .support-scope__icon { background: #E5563D; color: #fff; }

.support-scope__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.support-scope__list li {
  font-size: var(--text-sm);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.support-scope__col--yes .support-scope__list li { color: #1A5E30; }
.support-scope__col--no  .support-scope__list li { color: #7A2015; }

.support-scope__list li::before {
  content: '–';
  position: absolute;
  left: 0;
  opacity: 0.5;
}

.support-scope__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-ink);
}

.support-scope__note a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}
.support-scope__note a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .support-scope { grid-template-columns: 1fr; }
}

/* -----------------------------------------------
   FOOTER
----------------------------------------------- */
.site-footer {
  background: var(--color-ink-deep);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand__name {
  font-size: var(--text-md);
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-nav a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 150ms;
}
.footer-nav a:hover { color: var(--color-lime); }

.footer-bottom {
  padding-top: 1.25rem;
  text-align: center;
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  font-family: var(--font-utility);
}

/* -----------------------------------------------
   PAGINATION
----------------------------------------------- */
.pagination {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  margin-top: 2rem;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.pagination a:hover { border-color: var(--color-ink); color: var(--color-ink); }
.pagination .active { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }

/* -----------------------------------------------
   CUSTOMER REPLY FORM (track.php)
----------------------------------------------- */
.customer-reply-card { border-top: 3px solid var(--color-lime); }

.customer-reply-form textarea { min-height: 120px; }

/* -----------------------------------------------
   MOBILE NAV — HAMBURGER
----------------------------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
  transition: background 150ms, border-color 150ms;
  flex-shrink: 0;
}
.nav-toggle:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-ink);
}
.nav-toggle svg { display: block; }
.nav-toggle-icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon--open  { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon--close { display: block; }

/* External-link icon in nav */
.nav-link .icon-external {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.2em;
  opacity: 0.55;
  transition: opacity 150ms;
}
.nav-link:hover .icon-external { opacity: 1; }

/* -----------------------------------------------
   RESPONSIVE — MOBILE FIRST
----------------------------------------------- */

/* ── 1100px: slightly tighter container ── */
@media (max-width: 1160px) {
  :root { --container: 960px; }
}

/* ── 900px: submit aside collapses ── handled in submit layout section ── */

/* ── 768px: core layout changes ── */
@media (max-width: 768px) {

  /* Nav: hamburger */
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem var(--gutter);
    gap: 0;
    z-index: 99;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .nav-link {
    display: block;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-base);
  }

  .site-nav .btn {
    margin-top: 1rem;
    width: 100%;
  }

  /* Header brand: hide "by" + shopiexpert logo on very small screens later */
  .header-brand__sep { display: none; }
  .header-brand__company { display: none; }

  /* Hero */
  .hero { padding: 3rem 0 2.5rem; }
  .hero__title { font-size: var(--text-2xl); }
  .hero__subtitle { font-size: var(--text-base); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; justify-content: center; }

  /* Stats */
  .stats-bar__grid { grid-template-columns: repeat(3,1fr); gap: 1rem; }

  /* Features: 2-col */
  .features__grid { grid-template-columns: 1fr 1fr; }

  /* Page header */
  .page-header { padding: 2rem 0 1.5rem; }
  .page-header__title { font-size: var(--text-xl); }

  /* Page grid (track page) */
  .page-grid { grid-template-columns: 1fr; }
  .page-grid__main { grid-column: 1; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }

  /* Ticket info grid */
  .ticket-info-grid { grid-template-columns: 1fr 1fr; }

  /* Thread messages */
  .thread-message { padding: 1rem; }

  /* Section title */
  .section-title { font-size: var(--text-xl); }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 1.25rem; }
  .footer-nav { gap: 0.875rem; }
}

/* ── 600px: single-column finish ── */
@media (max-width: 600px) {

  /* Scope notice: stack columns */
  .support-scope { grid-template-columns: 1fr; }

  /* Aside image card stats: hide on very small */
  .support-image-card__stats { grid-template-columns: repeat(3,1fr); }

  /* Ticket info: 1 col */
  .ticket-info-grid { grid-template-columns: 1fr; }

  /* Features: 1-col */
  .features__grid { grid-template-columns: 1fr; }

  /* Stats bar: 3 stays readable at 375+ but reduce font */
  .stat__value { font-size: var(--text-xl); }

  /* Card padding */
  .card { padding: 1.25rem; }

  /* Submit image card: shorter image */
  .support-image-card__img { max-height: 200px; object-position: 50% 15%; }
  .support-image-card__stats { display: none; }

  /* Thread message author smaller */
  .thread-message__meta { font-size: 0.75rem; }
}

/* ── 480px: tight phones ── */
@media (max-width: 480px) {
  :root { --gutter: 1rem; }

  .hero { padding: 2.5rem 0 2rem; }
  .hero__title { font-size: var(--text-xl); }
  .hero__label { font-size: 0.6875rem; }

  .page-header__title { font-size: var(--text-lg); }
  .page-body { padding: 1.5rem 0 3rem; }

  /* Stats: 3-col still works at 375, just reduce size */
  .stats-bar { padding: 1.5rem 0; }
  .stats-bar__grid { gap: 0.5rem; }
  .stat__value { font-size: var(--text-lg); }
  .stat__label { font-size: 0.6875rem; }

  .btn--lg { padding: 0.875rem 1.5rem; font-size: var(--text-base); }

  /* Footer */
  .footer-nav { flex-direction: column; gap: 0.5rem; }

  /* Hours list */
  .hours-list li { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
}

/* -----------------------------------------------
   FORM OPTIONAL / REQUIRED LABELS
----------------------------------------------- */
.form-optional {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-soft);
  font-family: var(--font-utility);
  margin-left: 0.25rem;
}

/* -----------------------------------------------
   SUCCESS CARD
----------------------------------------------- */
.success-card {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 560px;
  margin-inline: auto;
}
.success-card__icon {
  width: 56px;
  height: 56px;
  background: #E8F5EC;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--color-success);
}
.success-card h2 {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
}
.success-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.success-card__number {
  background: var(--color-surface-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  min-width: 240px;
}
.label-sm {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  font-family: var(--font-utility);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.ticket-number-display {
  font-family: var(--font-utility);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-ink);
}

/* -----------------------------------------------
   SUBMIT PAGE — FORM ANIMATIONS
----------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submit-form .form-group--animated {
  animation: fadeInUp 0.4s ease both;
}
.submit-form .form-group--animated:nth-child(1) { animation-delay: 0.05s; }
.submit-form .form-group--animated:nth-child(2) { animation-delay: 0.1s; }
.submit-form .form-group--animated:nth-child(3) { animation-delay: 0.15s; }
.submit-form .form-group--animated:nth-child(4) { animation-delay: 0.2s; }
.submit-form .form-group--animated:nth-child(5) { animation-delay: 0.25s; }
.submit-form .form-group--animated:nth-child(6) { animation-delay: 0.3s; }
.submit-form .form-group--animated:nth-child(7) { animation-delay: 0.35s; }

/* -----------------------------------------------
   SUBMIT PAGE — TWO-COLUMN LAYOUT
----------------------------------------------- */
.submit-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.submit-layout__aside {
  position: sticky;
  top: calc(var(--header-h, 64px) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Image card */
.support-image-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.support-image-card__img-wrap {
  position: relative;
  line-height: 0;
}

.support-image-card__img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  max-height: 340px;
}

.support-image-card__badge {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(8, 44, 32, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-utility);
  letter-spacing: 0.02em;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.support-image-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.support-image-card__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.support-image-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.support-image-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}

.support-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.support-stat__value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
  font-family: var(--font-utility);
}

.support-stat__label {
  font-size: 0.6875rem;
  color: var(--color-text-soft);
  line-height: 1.3;
}

/* Working hours card */
.hours-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  padding: 1.1rem 1.25rem 1.25rem;
}

.hours-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  color: var(--color-text-muted);
}

.hours-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}

.hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-utility);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--color-border);
  color: var(--color-text-soft);
  transition: background 250ms, color 250ms;
}

.hours-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transition: background 250ms;
}

.hours-badge--open {
  background: #E8F5EC;
  color: #2D7D46;
}

.hours-badge--closed {
  background: #FEF3EE;
  color: #C04D34;
}

.hours-list {
  list-style: none;
  margin: 0 0 0.875rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  padding: 0.45rem 0.625rem;
  background: var(--color-surface-soft);
  border-radius: var(--radius-sm, 6px);
}

.hours-list__off {
  color: var(--color-text-soft);
}

.hours-time {
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

.hours-card__note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Documentation link card */
.docs-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  text-decoration: none;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}

.docs-card:hover {
  border-color: var(--color-ink);
  box-shadow: 0 4px 16px rgba(18,58,42,0.1);
  transform: translateY(-1px);
}

.docs-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #E8F5EC;
  border-radius: var(--radius-sm, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
}

.docs-card__body {
  flex: 1;
  min-width: 0;
}

.docs-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.docs-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.docs-card__arrow {
  flex-shrink: 0;
  color: var(--color-text-soft);
  transition: color 150ms, transform 150ms;
}

.docs-card:hover .docs-card__arrow {
  color: var(--color-ink);
  transform: translate(2px, -2px);
}

/* Track card */
.support-track-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  padding: 1.25rem;
  text-align: center;
}

.support-track-card__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* Collapse aside below 900px */
@media (max-width: 900px) {
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-layout__aside {
    position: static;
    /* Show aside above the form on small screens for visual impact */
    order: -1;
  }

  .support-image-card__img {
    max-height: 220px;
    object-position: 50% 20%;
  }

  .support-image-card__stats {
    display: none;
  }
}
