:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #172033;
  background: #f4f6f9;
  font-synthesis: none;
  --navy: #111827;
  --orange: #f58220;
  --orange-dark: #df6e12;
  --muted: #64748b;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #fff 0, #f4f6f9 300px); }
a { color: #c65e0b; }
body { display: flex; flex-direction: column; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 1.25rem;
  color: #172033;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px #1720330a;
  backdrop-filter: blur(12px);
}
.site-header-inner {
  width: min(1200px, 100%);
  min-height: 80px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: .8rem; color: #172033; text-decoration: none; font-size: 1rem; letter-spacing: .02em; font-weight: 700; }
.brand img { display: block; width: auto; height: 36px; object-fit: contain; }
.brand .logo-dark { display: none; }
.brand span { padding-left: .8rem; border-left: 1px solid var(--border); }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.site-nav > a, .nav-dropdown > summary { color: #475569; font-size: .86rem; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap; }
.site-nav > a:hover, .nav-dropdown > summary:hover, .dropdown-panel a:hover { color: var(--orange-dark); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-panel { display: none; position: absolute; top: calc(100% + 24px); left: 0; z-index: 2; min-width: 220px; padding: .5rem; background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 12px 28px #1720331a; }
.nav-dropdown:hover .dropdown-panel, .nav-dropdown[open] .dropdown-panel { display: grid; gap: .15rem; }
.dropdown-panel a { display: block; padding: .6rem .65rem; color: #475569; font-size: .88rem; text-decoration: none; border-radius: 5px; }
.dropdown-panel a:hover { background: #f8fafc; }
.dropdown-panel form { margin: .2rem 0; }
.nav-contact, .nav-login { display: inline-block; padding: .65rem 1rem; color: #fff !important; background: var(--orange); border-radius: 7px; font-size: .85rem !important; font-weight: 700 !important; text-decoration: none; }
.nav-contact:hover, .nav-login:hover { background: var(--orange-dark); }
.site-menu-toggle { display: none; padding: .45rem .65rem; color: #172033; background: #fff; border: 1px solid var(--border); border-radius: 6px; font-size: 1.1rem; line-height: 1; }
.site-nav form.inline { margin: 0; }
.site-nav form.inline button { width: 100%; text-align: left; }
main { flex: 1; width: min(1180px, 100%); margin: 2rem auto 4rem; padding: 0 1.25rem; }
h1 { margin: .2rem 0 .6rem; color: #111827; font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.025em; }
h2 { margin: 0 0 .75rem; color: #172033; font-size: 1.2rem; }
p { line-height: 1.6; }
.page-intro { margin: 0 0 1.5rem; }
.page-intro h1 { margin: 0 0 .4rem; }
.eyebrow { margin: 0 0 .4rem; color: var(--orange-dark); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card {
  margin: 1rem 0;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px #1720330a;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.muted { color: var(--muted); }
label { display: block; margin: .8rem 0 .3rem; color: #273449; font-size: .94rem; font-weight: 700; }
input, textarea, select {
  width: 100%;
  padding: .75rem .85rem;
  color: #172033;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 3px solid #f5822033; border-color: var(--orange); }
.date-field { position: relative; }
.date-picker-native { position: absolute; top: 0; right: 0; z-index: 2; width: 44px; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.date-picker-icon { position: absolute; top: 50%; right: 12px; color: var(--muted); pointer-events: none; transform: translateY(-50%); }
.date-picker-icon svg { display: block; width: 18px; height: 18px; }
textarea { min-height: 100px; resize: vertical; }
button, .button {
  display: inline-block;
  padding: .72rem 1.05rem;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
button:hover, .button:hover { color: #fff; background: var(--orange-dark); transform: translateY(-1px); }
button.secondary, .button.secondary { background: #334155; }
button.secondary:hover, .button.secondary:hover { background: #1e293b; }
button.danger { background: #b91c1c; }
form.inline { display: inline; }
form.inline button { padding: .42rem .7rem; }
.notice { padding: .9rem 1rem; color: #166534; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 8px; }
.notice.error { color: #991b1b; background: #fee2e2; border-color: #fecaca; }
.tag { display: inline-block; padding: .18rem .6rem; color: #334155; background: #e8edf3; border-radius: 99px; font-size: .84rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.actions form { display: flex; align-items: center; gap: .4rem; }
.actions select { width: auto; padding: .5rem; }
.account-list { display: grid; gap: .75rem; }
.account-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.settings-card { margin: 0; min-width: 0; }
.settings-card h2 { margin-bottom: .6rem; }
.profile-details { margin: .7rem 0 0; }
.profile-details > div { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--border); }
.profile-details dt { color: var(--muted); font-size: .9rem; font-weight: 700; }
.profile-details dd { margin: 0; color: #172033; font-weight: 600; overflow-wrap: anywhere; }
.password-form { margin-top: 1rem; }
.password-form button { min-width: 180px; }
.account-card { padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.account-summary, .account-badges, .support-case-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .85rem; }
.account-summary > div:first-child { display: grid; gap: .2rem; }
.account-summary > div:first-child span { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.account-badges { justify-content: flex-start; }
.account-edit { margin-top: .8rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.account-edit summary { color: #a64e0a; font-weight: 700; cursor: pointer; }
.account-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin-top: .5rem; }
.compact-list { display: grid; gap: .5rem; padding: 0; list-style: none; }
.compact-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.compact-list li span { color: var(--muted); font-size: .9rem; }
.support-case { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.support-case-heading h2, .support-case-heading h3 { margin: 0; }
.support-thread { display: grid; gap: .65rem; }
.support-message { padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; overflow-wrap: anywhere; }
.support-message.staff-reply { background: #fff7ed; border-color: #fed7aa; }
.support-message p { margin: .25rem 0; white-space: pre-wrap; }
.support-message .support-message-meta { color: var(--muted); font-size: .82rem; font-weight: 700; }
.support-reply-form { margin: 1rem 0; padding: 1rem; background: #f8fafc; border-radius: 8px; }
.account-card .notice { margin: .7rem 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: #334155; background: #f8fafc; font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.site-footer { padding: 42px 20px 20px; color: var(--muted); background: #fff; border-top: 1px solid var(--border); }
.footer-inner { width: min(1200px, 100%); margin: auto; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr; gap: 30px; padding-bottom: 30px; }
.footer-grid h2 { margin: 0 0 1rem; color: #172033; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-grid p, .footer-grid li { font-size: .84rem; line-height: 1.7; }
.footer-grid p { margin: .5rem 0; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li { margin: 0 0 .35rem; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--orange-dark); }
.footer-brand { width: auto; max-width: 190px; height: 36px; object-fit: contain; margin-bottom: .5rem; }
.footer-button { display: inline-block; padding: .6rem .9rem; color: #fff !important; background: var(--orange); border-radius: 7px; font-weight: 700; }
.footer-button:hover { background: var(--orange-dark); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .78rem; }
@media (max-width: 980px) {
  .site-header { padding: 0 1rem; }
  .site-header-inner { min-height: 70px; flex-wrap: nowrap; gap: .55rem; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand img { min-width: 0; max-width: 45%; flex: 0 1 auto; }
  .brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-menu-toggle { display: inline-block; flex: 0 0 auto; }
  .site-nav { display: none; position: absolute; top: 100%; left: -1rem; right: -1rem; z-index: 5; align-items: stretch; flex-direction: column; gap: .1rem; max-height: calc(100vh - 70px); overflow-y: auto; padding: .7rem 1rem 1rem; background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px #17203320; }
  .site-nav.is-open { display: flex; }
  .site-nav > a, .nav-dropdown > summary { display: block; padding: .65rem 0; }
  .site-nav .nav-contact, .site-nav .nav-login { padding: .7rem 1rem; text-align: center; }
  .nav-dropdown:hover .dropdown-panel { display: none; }
  .nav-dropdown[open] .dropdown-panel { display: grid; position: static; min-width: 0; margin: .2rem 0 .5rem; box-shadow: none; }
  .portal-account .dropdown-panel { max-height: 55vh; overflow-y: auto; }
  main { margin-top: 1.25rem; padding: 0 .9rem; }
  .account-settings-grid { grid-template-columns: 1fr; }
  table { min-width: 620px; font-size: .9rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 440px) {
  .brand { gap: .4rem; max-width: calc(100% - 3rem); font-size: .85rem; }
  .brand img { height: 27px; }
  .brand span { padding-left: .45rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
}
