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

:root {
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d1d5db;
  --brand: #e00000;
  --brand-hover: #bf0000;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --container: 1320px;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: clamp(15px, 0.25vw + 14px, 17px);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(12px, 3vw, 64px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  background: #111827;
  color: #ffffff;
  border-radius: 10px;
  transform: translateY(-160%);
  transition: transform 120ms ease;
  z-index: 50;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: #ffffff;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
}

.brand-logo {
  width: clamp(64px, 3.2vw, 96px);
  height: clamp(64px, 3.2vw, 96px);
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 0;
  line-height: 1.05;
}

.brand-name {
  font-weight: 800;
  font-size: clamp(20px, 0.9vw + 16px, 32px);
  letter-spacing: 0.2px;
  line-height: 1.05;
}

.brand-tagline {
  font-weight: 600;
  font-size: clamp(12px, 0.35vw + 11px, 15px);
  color: var(--muted);
  line-height: 1.1;
}

.search {
  display: flex;
  align-items: center;
  justify-self: center;
  width: min(860px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 12px;
  background: #ffffff;
}

.search input {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 1rem;
  padding: 12px 8px;
  background: transparent;
  color: var(--text);
}

.search input::placeholder {
  color: #9ca3af;
}

.search-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-btn svg {
  width: 20px;
  height: 20px;
  fill: #374151;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #4b5563;
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover {
  background: #f3f4f6;
  color: #111827;
}

.nav .nav-cta {
  color: #374151;
}

.avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #111827;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 40px;
}

.avatar-badge:hover {
  background: #e5e7eb;
}

.avatar-menu {
  position: relative;
  display: inline-flex;
}

.avatar-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 20;
}

.avatar-dropdown.is-open {
  display: grid;
}

.avatar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 700;
  color: #111827;
}

.avatar-item:hover {
  background: #f3f4f6;
}

.divider {
  border-top: 1px solid var(--line);
}

.hero {
  padding-top: 6px;
}

.cta-stack {
  display: grid;
  gap: 20px;
  padding-block: 22px;
}

.cta-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.cta-icon {
  width: 92px;
  height: 92px;
  border: 2px solid #9ca3af;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-inline: auto;
  background: #ffffff;
}

.cta-body {
  display: grid;
  gap: 10px;
}

.cta-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #4b5563;
}

.cta-text {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-actions-wide {
  gap: 10px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.toast {
  min-height: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.content-section {
  padding-block: 26px;
}

.section-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #4b5563;
}

.prose {
  color: #4b5563;
  font-size: 0.98rem;
  max-width: 150ch;
  margin-inline: auto;
}

.prose p {
  margin: 0 0 14px 0;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

#services .prose {
  max-width: min(160ch, 100%);
  margin-inline: auto;
  text-align: left;
  color: #374151;
  font-size: 0.98rem;
  line-height: 1.75;
}

#services .section-title {
  text-align: left;
  letter-spacing: 0.2px;
  font-size: clamp(1.15rem, 0.6vw + 1.05rem, 1.6rem);
  color: #111827;
  margin-bottom: 14px;
  max-width: min(160ch, 100%);
  margin-inline: auto;
}

#services.content-section {
  padding-block: clamp(34px, 4vw, 72px);
  background:
    radial-gradient(1000px 300px at 50% 0%, rgba(224, 0, 0, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff, #f9fafb);
}

#services .prose p:first-child {
  font-size: clamp(1.05rem, 0.45vw + 0.95rem, 1.25rem);
  font-weight: 500;
  color: #111827;
}

#services .services-grid {
  display: grid;
  grid-template-columns: 1fr minmax(420px, 620px);
  gap: clamp(16px, 2.5vw, 28px);
  align-items: start;
}

#services .services-grid .prose {
  margin: 0;
  max-width: none;
}

#services .services-grid .section-title {
  margin-inline: 0;
  max-width: none;
}

.reading-box {
  position: relative;
  border: 2px dotted var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 18px 44px;
  justify-self: end;
  width: 100%;
}

.reading-head {
  margin: 0 0 14px 0;
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1.1;
  color: #111827;
}

.reading-list {
  display: grid;
  gap: 14px;
}

.reading-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: start;
}

.reading-item.is-hidden {
  display: none !important;
}

.reading-thumb {
  width: 86px;
  height: 86px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f9fafb;
  padding: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.reading-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reading-body {
  display: grid;
  gap: 6px;
  align-content: start;
}

.reading-title {
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.12;
  color: #111827;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.reading-desc {
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.reading-btn.btn {
  width: fit-content;
  min-height: 0;
  padding: 10px 16px;
  border-radius: 10px;
}

.reading-empty {
  color: var(--muted);
  font-weight: 700;
  padding: 10px 0;
}

.reading-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 74px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.reading-nav::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: auto;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
}

.reading-nav-prev {
  left: -22px;
}

.reading-nav-prev::before {
  border-right: 18px solid #9ca3af;
}

.reading-nav-next {
  right: -22px;
}

.reading-nav-next::before {
  border-left: 18px solid #9ca3af;
}

.reading-nav:hover::before {
  border-right-color: #6b7280;
  border-left-color: #6b7280;
}

.reading-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.reading-nav[disabled]:hover::before {
  border-right-color: #9ca3af;
  border-left-color: #9ca3af;
}

.updates {
  display: grid;
  gap: 10px;
}

.update-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.update-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.update-icon img {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.update-main {
  display: grid;
  gap: 3px;
}

.update-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #374151;
}

.update-meta {
  font-size: 0.9rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.update-action .btn {
  min-width: 64px;
  padding-inline: 16px;
}

.ad-section {
  padding-block: 16px 34px;
}

.ad-box {
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 0.9rem;
  background: #ffffff;
}

.dashboard {
  padding-block: 10px 36px;
}

.dash-hero {
  padding-top: 6px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-block: 22px;
  align-items: start;
}

.dash-col {
  display: grid;
  gap: 14px;
}

.dash-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.12);
}

.status-dot.is-on {
  background: #16a34a;
}

.status-dot.is-off {
  background: #dc2626;
}

.dash-row-title {
  font-weight: 800;
  color: #111827;
  font-size: 0.95rem;
}

.dash-row-sub {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 2px;
}

.dash-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
  position: relative;
}

.dash-item:hover {
  background: #f9fafb;
}

.dash-item.is-link {
  padding-right: 44px;
}

.dash-item.is-link::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.dash-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dash-item-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.dash-item-icon.is-flip img {
  transform: scaleX(-1);
}

.dash-item-title {
  font-weight: 900;
  color: #111827;
  font-size: 0.95rem;
}

.dash-item-sub {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 2px;
}

.dash-usage {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.dash-usage-meta {
  display: grid;
  gap: 4px;
  color: #4b5563;
  font-size: 0.85rem;
  padding-left: 2px;
}

.usage-bar {
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.usage-bar-used {
  height: 100%;
  background: #f97316;
  min-width: 0;
}

.dash-usage-note {
  color: #6b7280;
  font-size: 0.85rem;
}

.quota-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.quota-buttons .btn {
  padding: 10px 12px;
  min-height: 44px;
  line-height: 1.2;
}

.site-footer {
  padding-block: 16px 22px;
  color: #6b7280;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  place-items: center;
}

.footer-inner-split {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  place-items: initial;
}

.footer-contact {
  justify-self: start;
  text-align: left;
}

.footer-contact-title {
  font-weight: 900;
  color: #111827;
  margin-bottom: 6px;
}

.footer-contact-body {
  margin: 0;
  font-style: normal;
  display: grid;
  gap: 2px;
}

.footer-contact a {
  color: inherit;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-copy {
  justify-self: end;
  white-space: nowrap;
}

.auth-page {
  min-height: calc(100vh - 140px);
}

.auth-hero {
  padding-block: clamp(24px, 4vw, 56px);
}

.manager-page {
  min-height: calc(100vh - 140px);
}

.manager-title {
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #111827;
  justify-self: center;
  text-align: center;
}

.manager-login {
  display: grid;
  gap: 26px;
  padding-top: 14px;
}

.manager-form {
  width: min(520px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 12px;
  padding-block: 18px;
}

.manager-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: center;
}

.manager-quest {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-inline: 12px;
  border: 1px dashed #c7cbd4;
  border-radius: 12px;
  color: #111827;
  background: #ffffff;
}

.manager-btn {
  width: 120px;
  justify-self: center;
  margin-top: 8px;
}

.mgr-grid {
  display: grid;
  grid-template-columns: 300px 280px 1fr;
  gap: 18px;
  padding-block: 18px;
}

.mgr-col {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mgr-col-mid {
  min-width: 0;
}

.mgr-col-wide {
  min-width: 0;
}

.mgr-card {
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(900px 260px at 50% -20%, rgba(224, 0, 0, 0.10), transparent 60%),
    #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.mgr-card-table {
  padding: 14px 14px 10px;
}

.mgr-card-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.mgr-card-head-row {
  grid-template-columns: 1fr minmax(220px, 320px);
  align-items: center;
  gap: 12px;
}

.mgr-card-title {
  font-weight: 900;
  color: #111827;
  font-size: 1rem;
  line-height: 1.2;
}

.mgr-card-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mgr-title-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.mgr-card-sub {
  color: #6b7280;
  font-size: 0.88rem;
}

.mgr-link {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.mgr-link:hover {
  border-color: rgba(17, 24, 39, 0.22);
}

.mgr-link-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  place-items: center;
}

.mgr-link-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.mgr-link-body {
  min-width: 0;
}
.mgr-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
  color: #4b5563;
  padding-block: 4px;
}

.mgr-metric-val {
  font-weight: 900;
  color: #111827;
}

.mgr-bar {
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 10px;
}

.mgr-bar-used {
  height: 100%;
  background: #f97316;
}

.mgr-bar-note {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

.mgr-search {
  display: grid;
  justify-items: end;
}

.mgr-search-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding-inline: 14px;
  outline: none;
}

.mgr-table {
  border: 1px dashed #c7cbd4;
  border-radius: 14px;
  overflow: hidden;
}

.mgr-thead,
.mgr-row {
  display: grid;
  grid-template-columns: 180px 1fr 150px 90px;
  gap: 10px;
  align-items: center;
}

.mgr-thead {
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
  color: #111827;
  font-size: 0.85rem;
  padding: 10px 12px;
}

.mgr-tbody {
  max-height: min(58vh, 560px);
  overflow: auto;
  background: #ffffff;
}

.mgr-row {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 0.9rem;
  color: #111827;
}

.mgr-row:last-child {
  border-bottom: 0;
}

.mgr-cell {
  min-width: 0;
}

.mgr-cell-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgr-cell-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

.mgr-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  place-items: center;
}

.mgr-icon-btn:hover {
  background: #f3f4f6;
}

.mgr-icon-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.mgr-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  user-select: none;
}

.mgr-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mgr-switch-ui {
  font-size: 16px;
  line-height: 1;
  color: #9ca3af;
}

.mgr-switch input:checked + .mgr-switch-ui {
  color: #16a34a;
}

.mgr-th-actions,
.mgr-cell-actions {
  justify-self: center;
}

.mgr-th-size,
.mgr-cell-size {
  justify-self: end;
}

.mgr-dialog-actions {
  gap: 10px;
}

.mgr-edit-form {
  display: grid;
  gap: 12px;
}

.mgr-textarea {
  min-height: 120px;
  resize: vertical;
}

.mgr-check {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  color: #111827;
}

.mgr-progress {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.mgr-progress-bar {
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.mgr-progress-fill {
  height: 100%;
  width: 0%;
  background: #f97316;
}

.mgr-progress-text {
  font-size: 0.85rem;
  color: #6b7280;
}

.mgr-info-thumb {
  width: 100%;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.mgr-info-thumb img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.mgr-info {
  display: grid;
  gap: 8px;
}

.mgr-info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: start;
}

.mgr-info-k {
  font-weight: 900;
  color: #111827;
  font-size: 0.9rem;
}

.mgr-info-v {
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

@media (max-width: 640px) {
  .manager-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .manager-btn {
    width: 100%;
  }

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

  .mgr-card-head-row {
    grid-template-columns: 1fr;
  }

  .mgr-thead,
  .mgr-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mgr-th-actions,
  .mgr-th-size,
  .mgr-cell-actions,
  .mgr-cell-size {
    justify-self: start;
  }

  .footer-inner-split {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
  }

  .footer-copy {
    justify-self: start;
  }
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(18px, 2.4vw, 42px);
  align-items: start;
}

.auth-divider {
  width: 1px;
  background: var(--line);
  align-self: stretch;
  opacity: 0.9;
}

.auth-panel {
  padding: clamp(16px, 2.4vw, 26px);
  border-radius: 18px;
  background:
    radial-gradient(900px 260px at 50% -20%, rgba(224, 0, 0, 0.10), transparent 60%),
    #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.auth-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 2px solid #9ca3af;
  display: grid;
  place-items: center;
  background: #ffffff;
}

.auth-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.auth-title {
  font-weight: 900;
  font-size: clamp(1.02rem, 0.45vw + 0.95rem, 1.25rem);
  color: #111827;
  line-height: 1.2;
}

.auth-subtitle {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

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

.label {
  font-weight: 800;
  font-size: 0.9rem;
  color: #374151;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 0.95rem;
  line-height: 1.2;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.input:focus {
  border-color: rgba(224, 0, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(224, 0, 0, 0.12);
}

.input[disabled] {
  background: #f3f4f6;
  color: #9ca3af;
}

.input-with-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn:active {
  transform: translateY(1px);
}

.icon-btn[disabled] {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.hint {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.4;
}

.help {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.4;
}

.link {
  color: #111827;
  text-decoration: underline;
  text-decoration-color: rgba(17, 24, 39, 0.35);
  text-underline-offset: 3px;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-status.is-error {
  color: #b91c1c;
}

.ui-dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(560px, calc(100% - 32px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.ui-dialog::backdrop {
  background: rgba(17, 24, 39, 0.55);
}

.ui-dialog-inner {
  padding: 18px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.ui-dialog-title {
  font-weight: 900;
  color: #111827;
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.2;
}

.ui-dialog-body {
  color: #4b5563;
  font-size: 0.95rem;
  white-space: pre-wrap;
  line-height: 1.6;
}

.ui-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

@media (min-width: 1024px) {
  .cta-stack {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .cta-card {
    height: 100%;
  }
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "search search"
      "nav nav";
    align-items: center;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .search {
    grid-area: search;
    justify-self: stretch;
    width: 100%;
  }

  .nav-toggle {
    grid-area: toggle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
  }

  .nav {
    grid-area: nav;
    display: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
  }

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

  .cta-card {
    grid-template-columns: 88px 1fr;
  }

  .cta-icon {
    width: 76px;
    height: 76px;
  }

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

  .auth-divider {
    display: none;
  }

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

  #services .services-grid {
    grid-template-columns: 1fr;
  }

  .reading-box {
    padding-inline: 18px;
  }

  .reading-nav-prev {
    left: 10px;
  }

  .reading-nav-next {
    right: 10px;
  }

  .reading-nav {
    width: 28px;
    height: 62px;
  }

  .reading-nav::before {
    border-top-width: 14px;
    border-bottom-width: 14px;
  }

  .reading-nav-prev::before {
    border-right-width: 14px;
  }

  .reading-nav-next::before {
    border-left-width: 14px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding-block: 12px;
  }

  .brand-logo {
    width: 64px;
    height: 64px;
  }

  .brand-name {
    font-size: 22px;
  }

  .brand-tagline {
    font-size: 13px;
  }

  .cta-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .cta-icon {
    margin-inline: 0;
  }

  .update-row {
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "icon main"
      "action action";
    align-items: start;
  }

  .update-icon {
    grid-area: icon;
  }

  .update-main {
    grid-area: main;
  }

  .update-action {
    grid-area: action;
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
  }
}
