:root {
  --navy: #0b1f42;
  --blue: #1f5eff;
  --blue-dark: #1749c9;
  --ink: #17233a;
  --muted: #62708a;
  --line: #dfe5ef;
  --soft: #f4f7fb;
  --white: #ffffff;
  --green: #0f9f78;
  --shadow: 0 18px 55px rgba(12, 31, 66, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(223,229,239,.85);
}
.nav-wrap { min-height: 76px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(145deg, var(--navy), var(--blue)); font-weight: 800; font-size: 20px;
  box-shadow: 0 10px 24px rgba(31,94,255,.22);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 20px; letter-spacing: .06em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 24px; margin-left: auto; }
.main-nav a { font-size: 14px; color: #3e4c63; }
.main-nav a:hover { color: var(--blue); }
.nav-cta { margin-left: 2px; }
.nav-toggle { display: none; margin-left: auto; border: 0; background: transparent; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent;
  border-radius: 12px; min-height: 46px; padding: 0 20px; font-weight: 700; cursor: pointer; transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 12px 26px rgba(31,94,255,.22); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: #b8c4d8; }
.btn-lg { min-height: 54px; padding: 0 27px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-light { background: #fff; color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: #fff; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(74,135,255,.18), transparent 24%),
    radial-gradient(circle at 12% 80%, rgba(15,159,120,.10), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image: linear-gradient(rgba(31,94,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(31,94,255,.06) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 72px; align-items: center; min-height: 720px; padding: 86px 0; }
.eyebrow { color: var(--blue); font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 19px 0 24px; font-size: clamp(44px, 5.5vw, 72px); line-height: 1.12; letter-spacing: -.035em; }
.hero h1 span { color: var(--blue); }
.hero-lead { max-width: 720px; margin: 0; font-size: 18px; color: var(--muted); }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; }
.trust-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; list-style: none; padding: 0; margin: 32px 0 0; color: #3e4c63; font-size: 14px; }
.trust-list li::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; color: var(--green); background: rgba(15,159,120,.1); font-weight: 900; }

.hero-panel { background: rgba(255,255,255,.96); border: 1px solid rgba(223,229,239,.95); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { padding: 24px 26px 18px; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); }
.panel-head span { font-weight: 800; font-size: 18px; }
.panel-head small { color: var(--muted); }
.lead-form { padding: 24px 26px 26px; }
.lead-form label { display: block; font-size: 13px; font-weight: 700; color: #34445e; margin-bottom: 15px; }
.lead-form select, .lead-form input, .lead-form textarea {
  width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; background: #fff; color: var(--ink); outline: none;
}
.lead-form textarea { resize: vertical; min-height: 106px; }
.lead-form select:focus, .lead-form input:focus, .lead-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,94,255,.09); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.form-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.field-error { border-color: #dc3545 !important; box-shadow: 0 0 0 3px rgba(220,53,69,.08) !important; }

.proof-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.proof-grid > div { min-height: 118px; display: flex; flex-direction: column; justify-content: center; padding: 20px 30px; border-right: 1px solid var(--line); }
.proof-grid > div:first-child { border-left: 1px solid var(--line); }
.proof-grid strong { font-size: 26px; color: var(--navy); }
.proof-grid span { color: var(--muted); font-size: 13px; }

.section { padding: 108px 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--navy); color: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.section-head h2, .split-layout h2, .rules-grid h2, .cta-band h2 { margin: 10px 0 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.2; letter-spacing: -.025em; }
.section-head p { max-width: 520px; margin: 0; color: var(--muted); }
.section-head.light p { color: #aebbd2; }
.body-copy { color: var(--muted); font-size: 17px; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.service-card { position: relative; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .25s ease; overflow: hidden; }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.service-card.featured { border-color: rgba(31,94,255,.42); }
.service-card.featured::after { content: "首批重点"; position: absolute; right: 0; top: 0; background: var(--blue); color: #fff; padding: 8px 15px; border-radius: 0 0 0 14px; font-size: 12px; font-weight: 800; }
.service-no { color: #9aa8bc; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.service-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 22px 0; border-radius: 15px; color: #fff; background: linear-gradient(145deg, var(--navy), var(--blue)); font-weight: 900; }
.service-card h3 { margin: 0 0 12px; font-size: 24px; }
.service-card p { color: var(--muted); }
.service-card ul { padding-left: 19px; color: #45546b; font-size: 14px; }
.service-card a { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--blue); font-weight: 800; }

.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.process-item { min-height: 220px; padding: 28px; border-radius: 18px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); }
.process-item span { color: #7fa5ff; font-weight: 800; }
.process-item h3 { margin: 22px 0 8px; }
.process-item p { color: #b7c2d7; margin: 0; }

.split-layout { display: grid; grid-template-columns: .88fr 1.12fr; gap: 74px; align-items: start; }
.notice-box { margin-top: 28px; padding: 22px; border: 1px solid #cdd8ea; border-radius: 16px; background: var(--soft); }
.notice-box strong { display: block; margin-bottom: 7px; }
.notice-box p { margin: 0; color: var(--muted); }
.fee-table { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 36px rgba(12,31,66,.07); }
.fee-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 66px; align-items: center; border-bottom: 1px solid var(--line); background: #fff; }
.fee-row span { padding: 16px 22px; }
.fee-row span:last-child { color: var(--muted); border-left: 1px solid var(--line); }
.fee-row:last-child { border-bottom: 0; }
.fee-head { background: var(--navy); color: #fff; font-weight: 800; }
.fee-head span:last-child { color: #fff; border-left-color: rgba(255,255,255,.14); }
.fee-foot { background: var(--soft); font-weight: 800; }

.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.case-card { padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.case-card.placeholder { border-style: dashed; }
.case-tag { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #eaf0ff; color: var(--blue); font-size: 12px; font-weight: 800; }
.case-card h3 { margin: 20px 0; }
.case-card dl { margin: 0; }
.case-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.case-card dt { color: var(--muted); }
.case-card dd { margin: 0; font-weight: 700; }
.case-card p { color: var(--muted); font-size: 14px; }

.rules-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 76px; align-items: start; }
.rule-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 22px 38px 22px 0; font-weight: 800; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 19px; font-size: 22px; color: var(--blue); }
details[open] summary::after { content: "−"; }
details p { margin: -5px 0 22px; color: var(--muted); max-width: 780px; }

.cta-band { padding: 78px 0; background: linear-gradient(135deg, #1749c9, #0b1f42); color: #fff; }
.cta-band .eyebrow { color: #9cbaff; }
.cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; }
.cta-band h2 { max-width: 820px; }
.cta-actions { display: flex; gap: 12px; }

.site-footer { background: #07152e; color: #c5cede; padding: 70px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.8fr repeat(3,1fr); gap: 46px; }
.brand-footer .brand-copy strong { color: #fff; }
.footer-grid p { max-width: 430px; color: #91a0ba; }
.footer-grid h4 { margin: 0 0 18px; color: #fff; }
.footer-grid > div:not(:first-child) { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a, .footer-grid span { color: #91a0ba; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 52px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); color: #74839c; font-size: 12px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 360px; padding: 14px 18px; border-radius: 12px; background: #10254b; color: #fff; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1050px) {
  .main-nav { display: none; position: fixed; inset: 76px 0 auto 0; padding: 26px 20px 34px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 18px; box-shadow: 0 20px 35px rgba(12,31,66,.08); }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { max-width: 820px; }
  .service-grid, .case-grid { grid-template-columns: 1fr; }
  .service-card { min-height: auto; }
  .split-layout, .rules-grid { grid-template-columns: 1fr; gap: 44px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 2 / 4; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1180px); }
  .nav-wrap { min-height: 68px; }
  .main-nav { inset-block-start: 68px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 18px; }
  .hero-grid { min-height: auto; padding: 62px 0 72px; }
  .hero h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .trust-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .panel-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .proof-grid > div { min-height: 100px; border-bottom: 1px solid var(--line); }
  .section { padding: 76px 0; }
  .section-head { align-items: flex-start; flex-direction: column; margin-bottom: 34px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-item { min-height: 0; }
  .fee-row { grid-template-columns: .85fr 1.15fr; font-size: 13px; }
  .fee-row span { padding: 13px 14px; }
  .cta-grid { grid-template-columns: 1fr; gap: 30px; }
  .cta-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 460px) {
  .hero h1 { font-size: 36px; }
  .hero-panel { border-radius: 18px; }
  .lead-form, .panel-head { padding-left: 18px; padding-right: 18px; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid > div { border-left: 1px solid var(--line); }
  .service-card { padding: 26px; }
  .section-head h2, .split-layout h2, .rules-grid h2, .cta-band h2 { font-size: 32px; }
}

/* Application portal */
.nav-text-link { font-size: 14px; color: var(--muted); white-space: nowrap; }
.flash-stack { position: relative; z-index: 40; padding-top: 16px; }
.flash { border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; border: 1px solid; font-size: 14px; }
.flash-success { color: #08664e; border-color: #a9decf; background: #ebfaf5; }
.flash-error { color: #a22632; border-color: #f0b7bd; background: #fff1f2; }
.form-errors { margin: 0 0 22px; padding: 14px 18px; border: 1px solid #f0b7bd; border-radius: 13px; color: #a22632; background: #fff1f2; }
.form-errors div + div { margin-top: 6px; }
.auth-section { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 72px 20px; background: var(--soft); }
.auth-card { width: min(100%, 520px); padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 10px 0 8px; font-size: 34px; }
.auth-card > p { color: var(--muted); }
.auth-switch { text-align: center; margin: 22px 0 0; }
.auth-switch a { color: var(--blue); font-weight: 800; }
.stack-form { display: grid; gap: 17px; }
.stack-form label { display: block; color: #34445e; font-size: 13px; font-weight: 700; }
.stack-form input, .stack-form select, .stack-form textarea, .inline-search input, .inline-search select {
  width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; background: #fff; color: var(--ink); outline: none;
}
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .inline-search input:focus, .inline-search select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,94,255,.09); }
.stack-form textarea { resize: vertical; }
.portal-section { min-height: calc(100vh - 180px); padding: 70px 0 100px; background: #f7f9fc; }
.portal-heading, .admin-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 30px; }
.portal-heading h1, .admin-heading h1 { margin: 8px 0 4px; font-size: clamp(32px,4vw,48px); line-height: 1.15; }
.portal-heading p, .admin-heading p { margin: 0; color: var(--muted); }
.narrow-container { max-width: 880px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { min-height: 128px; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.stat-card strong { color: var(--navy); font-size: 34px; line-height: 1; }
.stat-card span { color: var(--muted); font-size: 14px; margin-top: 10px; }
.data-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 30px rgba(12,31,66,.045); }
.form-card { padding: 28px; }
.card-head { min-height: 66px; padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.form-card .card-head { margin: -28px -28px 24px; }
.card-head h2 { margin: 0; font-size: 19px; }
.card-head a { color: var(--blue); font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 14px; }
th { color: #64728a; background: #f8fafd; font-size: 12px; letter-spacing: .03em; }
tbody tr:hover { background: #fbfcff; }
td a { color: var(--blue); }
td small { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: #f0f4fa; border-radius: 6px; padding: 3px 6px; }
.empty-state { padding: 52px 24px; text-align: center; color: var(--muted); }
.empty-state a { color: var(--blue); font-weight: 800; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; background: #edf1f7; color: #536079; }
.status-large { padding: 9px 14px; font-size: 14px; }
.status-submitted { background: #edf3ff; color: #2457cc; }
.status-reviewing, .status-quoted { background: #fff5db; color: #8a5b00; }
.status-in_progress { background: #e8f1ff; color: #1458a7; }
.status-waiting_user { background: #f4eaff; color: #7240a0; }
.status-completed { background: #e7f8f2; color: #08745a; }
.status-cancelled { background: #fff0f1; color: #b22b37; }
.status-disputed { background: #fff0e6; color: #a64e09; }
.detail-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; align-items: start; }
.detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: 8px 24px 24px; }
.detail-list > div { padding: 17px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:nth-child(odd):not(.full) { padding-right: 24px; }
.detail-list .full { grid-column: 1/-1; }
.detail-list dt { color: var(--muted); font-size: 12px; }
.detail-list dd { margin: 5px 0 0; font-weight: 700; }
.prewrap { white-space: pre-wrap; font-weight: 400 !important; line-height: 1.8; }
.timeline { padding: 25px; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 12px; position: relative; padding-bottom: 25px; }
.timeline-item:not(:last-child)::before { content:""; position:absolute; left:7px; top:15px; bottom:0; width:2px; background:var(--line); }
.timeline-item > span { width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: var(--blue); border: 4px solid #dfe8ff; z-index: 1; }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item small { margin-top: 3px; color: var(--muted); }
.timeline-item p { margin: 8px 0 0; color: #495870; }
.ua-cell, .details-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spaced-card { margin-top: 24px; }
.narrow-card { max-width: 640px; }
.btn-danger { color:#fff; background:#c63743; }
hr { border:0; border-top:1px solid var(--line); margin:24px 0; }
.compact-footer { padding-top: 8px; }
.compact-footer .footer-bottom { margin-top: 0; }

/* Admin */
.admin-body { background: #f5f7fb; }
.admin-topbar { position: fixed; z-index: 60; inset: 0 0 auto 0; height: 70px; display:flex; align-items:center; justify-content:space-between; padding:0 26px; color:#fff; background:#07152e; }
.admin-brand, .admin-login-brand { display:flex; align-items:center; gap:12px; }
.admin-brand .brand-mark, .admin-login-brand .brand-mark { width:38px; height:38px; }
.admin-brand div, .admin-login-brand div { display:flex; flex-direction:column; }
.admin-brand small, .admin-login-brand small { color:#8492aa; font-size:9px; letter-spacing:.15em; }
.admin-account { color:#b5c0d3; font-size:14px; }
.admin-account a { color:#fff; }
.admin-shell { display:grid; grid-template-columns:240px 1fr; min-height:100vh; padding-top:70px; }
.admin-sidebar { position:fixed; left:0; top:70px; bottom:0; width:240px; padding:22px 14px; background:#0b1f42; overflow:auto; }
.admin-sidebar a { display:block; padding:12px 14px; margin:3px 0; border-radius:9px; color:#aebbd2; font-size:14px; }
.admin-sidebar a:hover, .admin-sidebar a.active { color:#fff; background:rgba(255,255,255,.1); }
.admin-main { grid-column:2; padding:38px; min-width:0; }
.admin-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.inline-search { display:flex; gap:10px; align-items:flex-end; }
.inline-search input, .inline-search select { min-width:180px; margin:0; }
.admin-login-body { background:#07152e; }
.admin-login-body .auth-section { background: radial-gradient(circle at 70% 20%,rgba(31,94,255,.3),transparent 30%),#07152e; }
.admin-login-brand { margin-bottom:24px; }
.admin-login-brand strong { font-size:20px; }

@media (max-width: 1050px) {
  .nav-text-link { display:none; }
  .detail-grid { grid-template-columns:1fr; }
  .admin-shell { grid-template-columns:1fr; }
  .admin-sidebar { position:static; width:auto; display:flex; gap:6px; overflow-x:auto; padding:10px 14px; grid-row:1; }
  .admin-sidebar a { white-space:nowrap; }
  .admin-main { grid-column:1; padding:26px 20px; }
  .admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .auth-card { padding:26px 20px; }
  .portal-section { padding:48px 0 76px; }
  .portal-heading, .admin-heading { align-items:flex-start; flex-direction:column; }
  .stats-grid, .admin-stats { grid-template-columns:1fr 1fr; }
  .detail-list { grid-template-columns:1fr; }
  .detail-list .full { grid-column:auto; }
  .detail-list > div:nth-child(odd):not(.full) { padding-right:0; }
  .inline-search { width:100%; flex-direction:column; align-items:stretch; }
  .inline-search input, .inline-search select { min-width:0; }
  .admin-topbar { padding:0 14px; }
  .admin-account { font-size:0; }
  .admin-account a { font-size:14px; }
}
@media (max-width: 460px) {
  .stats-grid, .admin-stats { grid-template-columns:1fr; }
  .form-card { padding:20px; }
  .form-card .card-head { margin:-20px -20px 20px; }
}

/* Marketplace */
.theme-toggle { width: 38px; height: 38px; flex: 0 0 auto; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); cursor: pointer; font-size: 18px; }
.admin-theme-toggle { width: 34px; height: 34px; margin-right: 12px; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; vertical-align: middle; }
.market-hero { padding: 76px 0 48px; background: linear-gradient(180deg, var(--soft), var(--white)); border-bottom: 1px solid var(--line); }
.market-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: end; }
.market-hero h1 { margin: 10px 0 12px; font-size: clamp(38px,5vw,62px); line-height: 1.12; }
.market-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 17px; }
.category-bar { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 28px; }
.category-pill { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 13px; }
.category-pill:hover, .category-pill.active { border-color: var(--blue); color: var(--blue); background: rgba(31,94,255,.07); }
.market-toolbar { display: grid; grid-template-columns: 1fr 230px auto; gap: 12px; margin-bottom: 24px; }
.market-toolbar input, .market-toolbar select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; background: var(--white); color: var(--ink); }
.listing-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.listing-card { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: var(--white); box-shadow: 0 8px 28px rgba(12,31,66,.04); transition: .2s ease; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.listing-card.is-featured { border-color: rgba(31,94,255,.48); }
.listing-badge { position: absolute; top: 16px; right: 16px; border-radius: 999px; padding: 5px 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }
.listing-category { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.listing-card h2, .listing-card h3 { margin: 15px 0 9px; font-size: 21px; line-height: 1.35; }
.listing-card p { margin: 0; color: var(--muted); }
.listing-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 24px; }
.listing-price { font-size: 18px; font-weight: 900; color: var(--navy); }
.listing-meta { color: var(--muted); font-size: 12px; }
.listing-detail-layout { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.listing-main-card, .listing-side-card { border: 1px solid var(--line); border-radius: 20px; background: var(--white); overflow: hidden; }
.listing-content { padding: 30px; }
.listing-content h1 { margin: 10px 0 14px; font-size: clamp(32px,4vw,48px); line-height: 1.2; }
.listing-description { white-space: pre-wrap; line-height: 1.9; }
.listing-side-card { position: sticky; top: 98px; padding: 25px; }
.listing-side-card .listing-price { display: block; margin-bottom: 18px; font-size: 25px; }
.listing-facts { display: grid; gap: 0; margin: 0; }
.listing-facts div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.listing-facts dt { color: var(--muted); font-size: 12px; }
.listing-facts dd { margin: 4px 0 0; font-weight: 700; word-break: break-word; }
.listing-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.status-pending { background:#fff5db;color:#8a5b00; }
.status-approved { background:#e7f8f2;color:#08745a; }
.status-rejected { background:#fff0f1;color:#b22b37; }
.status-hidden, .status-withdrawn { background:#edf1f7;color:#536079; }
.status-sold { background:#e8f1ff;color:#1458a7; }
.log-json { max-width: 420px; white-space: pre-wrap; word-break: break-word; color: var(--muted); font-size: 12px; }
.sort-input { width: 88px !important; }
.checkbox-line { display: flex !important; align-items: center; gap: 9px; }
.checkbox-line input { width: auto !important; margin: 0 !important; }
.form-help { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.pagination { display: flex; justify-content: center; gap: 8px; padding: 28px 0 0; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:9px; background:var(--white); }
.pagination .active { color:#fff; background:var(--blue); border-color:var(--blue); }

/* Dark mode */
html[data-theme="dark"] {
  --navy: #d9e6ff;
  --blue: #74a0ff;
  --blue-dark: #94b6ff;
  --ink: #e7edf7;
  --muted: #9aa9bf;
  --line: #2a3850;
  --soft: #121b2a;
  --white: #0c1421;
  --green: #39c99f;
  --shadow: 0 18px 55px rgba(0,0,0,.38);
  color-scheme: dark;
}
html[data-theme="dark"] body, html[data-theme="dark"] .admin-body { background: var(--white); color: var(--ink); }
html[data-theme="dark"] .site-header { background: rgba(12,20,33,.92); border-color: var(--line); }
html[data-theme="dark"] .main-nav a, html[data-theme="dark"] .trust-list, html[data-theme="dark"] .service-card ul, html[data-theme="dark"] .lead-form label, html[data-theme="dark"] .stack-form label { color: #aebbd0; }
html[data-theme="dark"] .hero { background: radial-gradient(circle at 82% 18%,rgba(74,135,255,.16),transparent 24%),linear-gradient(180deg,#101b2c 0%,#0c1421 100%); }
html[data-theme="dark"] .hero-panel, html[data-theme="dark"] .service-card, html[data-theme="dark"] .fee-row, html[data-theme="dark"] .case-card, html[data-theme="dark"] .auth-card, html[data-theme="dark"] .stat-card, html[data-theme="dark"] .data-card, html[data-theme="dark"] .listing-card, html[data-theme="dark"] .listing-main-card, html[data-theme="dark"] .listing-side-card { background: #111c2c; }
html[data-theme="dark"] .lead-form input, html[data-theme="dark"] .lead-form select, html[data-theme="dark"] .lead-form textarea, html[data-theme="dark"] .stack-form input, html[data-theme="dark"] .stack-form select, html[data-theme="dark"] .stack-form textarea, html[data-theme="dark"] .inline-search input, html[data-theme="dark"] .inline-search select, html[data-theme="dark"] .market-toolbar input, html[data-theme="dark"] .market-toolbar select { background:#0b1421; color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .btn-ghost, html[data-theme="dark"] .category-pill, html[data-theme="dark"] .pagination a, html[data-theme="dark"] .pagination span, html[data-theme="dark"] .theme-toggle { background:#111c2c; color:var(--ink); }
html[data-theme="dark"] .proof-strip, html[data-theme="dark"] .proof-grid>div, html[data-theme="dark"] .market-hero { background:#0c1421; }
html[data-theme="dark"] .proof-grid strong, html[data-theme="dark"] .listing-price, html[data-theme="dark"] .stat-card strong { color:#dbe7fb; }
html[data-theme="dark"] th { color:#9aa9bf; background:#101a29; }
html[data-theme="dark"] tbody tr:hover { background:#142033; }
html[data-theme="dark"] code { background:#18253a; color:#c7d6eb; }
html[data-theme="dark"] .portal-section, html[data-theme="dark"] .auth-section { background:#0b1320; }
html[data-theme="dark"] .notice-box, html[data-theme="dark"] .fee-foot { background:#121f31; }
html[data-theme="dark"] .admin-main { background:#0b1320; }
html[data-theme="dark"] .admin-topbar { background:#050b14; }
html[data-theme="dark"] .admin-sidebar { background:#09172e; }
html[data-theme="dark"] .section-dark { background:#071225; }

@media (max-width: 920px) {
  .listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .listing-detail-layout { grid-template-columns: 1fr; }
  .listing-side-card { position: static; }
  .market-hero-grid { grid-template-columns:1fr; align-items:start; }
  .market-toolbar { grid-template-columns:1fr 1fr; }
  .market-toolbar .btn { grid-column:1/-1; }
}
@media (max-width: 650px) {
  .listing-grid { grid-template-columns:1fr; }
  .market-toolbar { grid-template-columns:1fr; }
  .market-toolbar .btn { grid-column:auto; }
  .theme-toggle { order: 2; }
}
.listing-cover { width: calc(100% + 50px); height: 170px; object-fit: cover; margin: -25px -25px 22px; border-bottom: 1px solid var(--line); background: var(--soft); }
.listing-detail-cover { display:block; width:100%; max-height:460px; object-fit:cover; border-bottom:1px solid var(--line); background:var(--soft); }
@media (max-width: 1050px) {
  html[data-theme="dark"] .main-nav { background:#0d1827; border-color:var(--line); }
}
.service-grid { grid-template-columns: repeat(auto-fit,minmax(245px,1fr)); }
.visitor-id { display:inline-block; max-width:240px; white-space:normal; word-break:break-all; }

/* Home market feeds */
.home-market-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.home-market-panel { overflow:hidden; }
.home-market-list { display:grid; }
.home-market-list > a { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 16px; padding:15px 20px; border-bottom:1px solid var(--line); color:var(--ink); }
.home-market-list > a:last-child { border-bottom:0; }
.home-market-list > a:hover { background:var(--soft); }
.home-market-list strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-market-list small { grid-column:2; grid-row:1/3; align-self:center; color:var(--muted); white-space:nowrap; }
.home-market-tag { color:var(--blue); font-size:12px; font-weight:800; }

/* Internal messages */
.nav-badge { display:inline-grid; min-width:19px; height:19px; padding:0 5px; place-items:center; margin-left:5px; border-radius:999px; background:#e63746; color:#fff; font-size:11px; line-height:1; vertical-align:middle; }
.admin-sidebar .nav-badge { float:right; margin-top:1px; }
.stat-link { color:inherit; }
.stat-link:hover { border-color:var(--blue); transform:translateY(-2px); }
.message-thread-list { display:grid; }
.message-thread-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; padding:18px 22px; border-bottom:1px solid var(--line); color:var(--ink); }
.message-thread-row:last-child { border-bottom:0; }
.message-thread-row:hover { background:var(--soft); }
.message-thread-row.is-unread { border-left:4px solid var(--blue); background:rgba(31,94,255,.045); }
.message-thread-title { display:flex; align-items:center; gap:8px; font-weight:850; }
.message-thread-row p { margin:6px 0 0; color:var(--muted); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-thread-meta { display:grid; justify-items:end; gap:7px; color:var(--muted); }
.message-badge { display:inline-grid; min-width:21px; height:21px; padding:0 6px; place-items:center; border-radius:999px; background:var(--blue); color:#fff; font-size:11px; }
.message-conversation { display:grid; gap:16px; padding:24px; }
.message-bubble { max-width:82%; padding:16px 18px; border:1px solid var(--line); border-radius:17px; background:var(--soft); }
.message-bubble.from-user { justify-self:end; border-bottom-right-radius:5px; background:rgba(31,94,255,.08); }
.message-bubble.from-admin { justify-self:start; border-bottom-left-radius:5px; }
.admin-conversation .message-bubble.from-admin { justify-self:end; border-bottom-right-radius:5px; border-bottom-left-radius:17px; background:rgba(31,94,255,.08); }
.admin-conversation .message-bubble.from-user { justify-self:start; border-bottom-left-radius:5px; border-bottom-right-radius:17px; background:var(--soft); }
.message-bubble header { display:flex; justify-content:space-between; gap:20px; margin-bottom:9px; }
.message-bubble header small { color:var(--muted); white-space:nowrap; }
.message-bubble p { margin:0; line-height:1.75; overflow-wrap:anywhere; }
.inline-form { display:inline-flex; }
.status-open { background:#e7f8f2; color:#08745a; }
.status-closed { background:#edf1f7; color:#536079; }

html[data-theme="dark"] .message-thread-row.is-unread { background:rgba(116,160,255,.08); }
html[data-theme="dark"] .message-bubble.from-user,
html[data-theme="dark"] .admin-conversation .message-bubble.from-admin { background:rgba(116,160,255,.12); }

@media (max-width: 820px) {
  .home-market-grid { grid-template-columns:1fr; }
  .home-market-list > a { grid-template-columns:1fr; }
  .home-market-list small { grid-column:1; grid-row:auto; }
  .message-thread-row { grid-template-columns:1fr; }
  .message-thread-meta { justify-items:start; }
  .message-bubble { max-width:94%; }
}
.status-fulfilled { background:#e7f8f2; color:#08745a; }
.status-expired { background:#f1f2f5; color:#6a7280; }

/* V5 editorial public front-end */
.refined-header { box-shadow:0 6px 24px rgba(12,31,66,.035); }
.refined-nav-wrap { min-height:72px; gap:20px; }
.refined-brand .brand-copy strong { color:#1160e8; font-size:24px; letter-spacing:.02em; }
.refined-brand .brand-copy small { color:#1160e8; font-weight:800; letter-spacing:.04em; text-transform:none; }
.shield-wordmark { gap:10px; color:#1262ec; white-space:nowrap; }
.brand-shield { width:36px; height:42px; display:grid; place-items:center; flex:0 0 auto; color:#1262ec; filter:drop-shadow(0 7px 12px rgba(18,98,236,.18)); }
.brand-shield svg { display:block; width:100%; height:100%; }
.brand-wordmark { display:flex; align-items:baseline; gap:7px; line-height:1; white-space:nowrap; }
.brand-wordmark strong { color:#1262ec; font-size:23px; letter-spacing:.025em; }
.brand-wordmark span { color:#35506f; font-size:12px; font-weight:800; letter-spacing:.025em; }
.public-main-nav { gap:20px; }
.public-main-nav a { position:relative; padding:25px 0 23px; white-space:nowrap; font-weight:650; color:#233148; }
.public-main-nav a::after { content:""; position:absolute; left:50%; right:50%; bottom:0; height:3px; border-radius:99px; background:var(--blue); transition:.2s ease; }
.public-main-nav a:hover::after,.public-main-nav a.active::after { left:0; right:0; }
.public-main-nav a.active { color:var(--blue); }
.nav-actions { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.nav-text-link { font-size:14px; color:#45536a; white-space:nowrap; }

.editorial-home { background:var(--white); }
.home-hero { position:relative; overflow:hidden; min-height:620px; background:linear-gradient(108deg,#f8fbff 0%,#f2f7ff 49%,#ffffff 100%); border-bottom:1px solid var(--line); }
.home-hero::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 15% 20%,rgba(31,94,255,.09),transparent 28%),radial-gradient(circle at 86% 80%,rgba(30,190,160,.08),transparent 28%); pointer-events:none; }
.home-hero-grid { position:relative; display:grid; grid-template-columns:minmax(0,1.03fr) minmax(420px,.97fr); align-items:center; min-height:620px; }
.home-hero-copy { padding:78px 0 76px; max-width:700px; }
.home-hero-copy h1 { margin:18px 0 22px; font-size:clamp(42px,4.15vw,60px); line-height:1.16; letter-spacing:-.042em; color:#101828; }
.home-hero-copy h1 .hero-title-line { display:block; width:max-content; max-width:100%; white-space:nowrap; }
.home-hero-copy h1 .hero-title-dark { color:#101828; }
.home-hero-copy h1 .hero-title-accent { margin-top:6px; color:#1262ec; }
.home-hero-copy>p { max-width:665px; margin:0; font-size:18px; line-height:1.9; color:#56657c; }
.hero-trust-row { display:flex; flex-wrap:wrap; gap:22px; margin-top:30px; font-size:13px; color:#2f405a; font-weight:700; }
.hero-trust-row span::before { content:"✓"; display:inline-grid; width:20px; height:20px; margin-right:7px; place-items:center; border-radius:50%; color:#1463ea; background:#e9f1ff; }
.home-hero-visual { position:relative; align-self:stretch; min-height:620px; display:flex; justify-content:flex-end; align-items:flex-end; }
.home-hero-visual::before { content:""; position:absolute; inset:58px 0 0 40px; border-radius:42% 0 0 0; background:linear-gradient(145deg,rgba(255,255,255,.2),rgba(255,255,255,.82)); }
.home-hero-visual img { position:relative; z-index:1; display:block; height:590px; width:auto; max-width:100%; object-fit:cover; object-position:center top; filter:saturate(.94); }
.hero-hand-note { position:absolute; z-index:2; right:0; bottom:48px; display:flex; flex-direction:column; width:238px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; backdrop-filter:none; transform:none; pointer-events:none; text-shadow:0 1px 0 rgba(255,255,255,.8); }
.hero-hand-note strong { color:#1362ea; font-size:20px; }
.hero-hand-note span { margin:5px 0 10px; color:#1362ea; font-size:21px; line-height:1.58; font-family:"KaiTi","STKaiti","Microsoft YaHei",sans-serif; font-weight:700; }
.hero-hand-note small { width:max-content; max-width:100%; padding-top:9px; border-top:2px solid #1463ea; color:#43526a; line-height:1.55; }

.home-market-overview { position:relative; z-index:3; margin-top:-28px; padding:0 0 82px; }
.dual-market-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.home-market-showcase { overflow:hidden; border:1px solid #e0e7f2; border-radius:22px; background:var(--white); box-shadow:0 20px 60px rgba(12,31,66,.09); }
.home-market-showcase>header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:25px 25px 18px; }
.home-market-showcase h2 { margin:5px 0 0; font-size:26px; line-height:1.2; }
.home-market-showcase>header>a { color:var(--muted); font-size:13px; font-weight:700; }
.home-category-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:0 18px 20px; }
.home-category-cards>a,.home-category-cards>div { min-height:104px; padding:15px 13px; border:1px solid #edf1f7; border-radius:13px; background:#f8faff; transition:.2s ease; }
.home-category-cards>a:hover { border-color:#b8cdfb; transform:translateY(-2px); background:#f2f6ff; }
.home-category-cards strong { display:block; margin-bottom:7px; color:#16233a; font-size:14px; }
.home-category-cards span { display:block; color:#66738a; font-size:11px; line-height:1.65; }
.home-feed-title { display:flex; justify-content:space-between; padding:15px 22px 11px; border-top:1px solid var(--line); color:#1d2c43; }
.home-feed-title span { color:var(--muted); font-size:12px; }
.home-editorial-table .table-head,.home-editorial-table>a { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(130px,.75fr) 88px; gap:14px; align-items:center; }
.home-editorial-table .table-head { padding:8px 22px; background:#f7f9fc; color:#8290a4; font-size:11px; }
.home-editorial-table>a { min-height:44px; padding:8px 22px; border-top:1px solid #edf1f6; font-size:12px; }
.home-editorial-table>a:hover { background:#f8fbff; }
.home-editorial-table strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#243249; font-size:12px; font-weight:650; }
.home-editorial-table>a span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#66738a; }
.home-editorial-table small { color:#7e8ba0; text-align:right; }
.home-empty-copy { min-height:180px; display:grid; place-items:center; padding:30px; color:var(--muted); text-align:center; border-top:1px solid var(--line); }

.center-section-head { max-width:760px; margin:0 auto 46px; text-align:center; }
.center-section-head h2 { margin:9px 0 15px; font-size:clamp(34px,4.2vw,52px); line-height:1.2; letter-spacing:-.035em; }
.center-section-head p { margin:0; color:var(--muted); font-size:16px; }
.home-service-section { padding-top:84px; }
.home-service-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.home-service-grid>a { min-height:255px; padding:28px; border:1px solid var(--line); border-radius:19px; background:var(--white); box-shadow:0 8px 30px rgba(12,31,66,.04); transition:.25s ease; }
.home-service-grid>a:hover { transform:translateY(-5px); box-shadow:var(--shadow); border-color:#c3d2ee; }
.service-symbol { display:grid; width:52px; height:52px; place-items:center; border-radius:15px; color:#fff; font-size:22px; font-weight:900; }
.service-symbol.blue { background:linear-gradient(135deg,#397df4,#1261ea); }
.service-symbol.green { background:linear-gradient(135deg,#45cfae,#13a57c); }
.service-symbol.purple { background:linear-gradient(135deg,#8877ff,#6757e5); }
.service-symbol.orange { background:linear-gradient(135deg,#ffb240,#f18b12); }
.home-service-grid h3 { margin:20px 0 10px; font-size:22px; }
.home-service-grid p { margin:0; color:var(--muted); line-height:1.8; }
.reason-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.reason-grid article { min-height:235px; padding:28px; border:1px solid #e2e8f2; border-radius:18px; background:var(--white); }
.reason-grid article>span { color:#2470ed; font-size:13px; font-weight:900; letter-spacing:.08em; }
.reason-grid h3 { margin:22px 0 10px; font-size:21px; }
.reason-grid p { margin:0; color:var(--muted); }
.process-section { background:var(--white); }
.horizontal-process { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.horizontal-process article { position:relative; min-height:250px; padding:25px 20px; border:1px solid var(--line); border-radius:18px; text-align:center; background:var(--white); }
.horizontal-process article:not(:last-child)::after { content:"→"; position:absolute; right:-20px; top:74px; z-index:2; color:#9db2d6; font-size:21px; }
.horizontal-process b { position:absolute; left:16px; top:-13px; display:grid; width:27px; height:27px; place-items:center; border-radius:50%; background:#1262ec; color:#fff; font-size:12px; box-shadow:0 8px 18px rgba(31,94,255,.22); }
.process-icon { display:grid; width:65px; height:65px; margin:8px auto 22px; place-items:center; border-radius:17px; color:#1463ea; background:#eff5ff; font-size:28px; }
.horizontal-process h3 { margin:0 0 10px; font-size:18px; }
.horizontal-process p { margin:0; color:var(--muted); font-size:13px; }
.editorial-info-grid { display:grid; grid-template-columns:1.2fr .8fr .8fr; gap:20px; align-items:stretch; }
.editorial-info-grid>div:first-child { padding:36px 36px 32px; border-radius:22px; background:#0d2349; color:#fff; }
.editorial-info-grid>div:first-child h2 { margin:10px 0 18px; font-size:38px; line-height:1.25; }
.editorial-info-grid>div:first-child p { color:#c0cee5; }
.editorial-info-grid>div:first-child .text-link { color:#9bb9ff; }
.editorial-note { padding:31px; border:1px solid var(--line); border-radius:22px; background:var(--white); }
.editorial-note strong { display:block; margin-bottom:12px; font-size:20px; }
.editorial-note p { margin:0; color:var(--muted); }
.latest-update-section { padding-top:82px; }
.compact-heading { margin-bottom:30px; }
.update-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.update-grid article { padding:28px; border:1px solid var(--line); border-radius:18px; background:var(--white); }
.update-date { color:#1463ea; font-size:12px; font-weight:900; }
.update-grid h3 { margin:13px 0 10px; font-size:20px; }
.update-grid p { margin:0; color:var(--muted); }

/* Market channel and detailed public pages */
.channel-hero { padding:76px 0 65px; background:linear-gradient(120deg,#f7faff,#eef5ff); border-bottom:1px solid var(--line); }
.channel-hero-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr); gap:60px; align-items:center; }
.channel-hero h1 { margin:12px 0 18px; max-width:820px; font-size:clamp(38px,5vw,62px); line-height:1.16; letter-spacing:-.04em; }
.channel-hero p { max-width:820px; color:var(--muted); font-size:17px; }
.channel-side-note { padding:28px; border:1px solid #cfe0ff; border-radius:20px; background:rgba(255,255,255,.78); box-shadow:0 16px 45px rgba(31,94,255,.08); }
.channel-side-note span { color:var(--blue); font-size:12px; font-weight:900; }
.channel-side-note strong { display:block; margin:9px 0 10px; font-size:21px; }
.channel-side-note p { margin:0; font-size:14px; }
.compact-section { padding:50px 0; }
.market-category-browser { padding:28px; border:1px solid var(--line); border-radius:22px; background:var(--white); }
.category-browser-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:20px; }
.category-browser-head h2 { margin:5px 0 0; font-size:28px; }
.text-link { color:var(--blue); font-weight:800; }
.market-category-groups { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.market-category-group { padding:16px; border:1px solid #e5ebf4; border-radius:15px; background:#fafcff; }
.market-category-group.active { border-color:#8db1f7; background:#f1f6ff; }
.market-parent-link { display:block; padding-bottom:12px; border-bottom:1px solid #e7edf5; }
.market-parent-link strong { display:block; color:#18263e; }
.market-parent-link span { display:block; margin-top:4px; color:#8491a4; font-size:11px; }
.market-child-links { display:flex; flex-wrap:wrap; gap:6px; padding-top:12px; }
.market-child-links a { padding:5px 8px; border-radius:8px; background:#fff; color:#56657c; font-size:11px; }
.market-child-links a:hover,.market-child-links a.active { color:#fff; background:#1463ea; }
.human-toolbar { grid-template-columns:minmax(0,1fr) auto auto; max-width:900px; margin:0 0 30px; }
.refined-listing-grid .listing-card { padding:0; overflow:hidden; }
.listing-card-body { padding:22px; }
.refined-listing-grid .listing-cover { width:100%; margin:0; height:185px; }
.listing-cover-placeholder { display:grid; place-items:center; background:linear-gradient(135deg,#edf4ff,#f8fbff); }
.listing-cover-placeholder span { display:grid; width:70px; height:70px; place-items:center; border-radius:22px; color:#fff; background:linear-gradient(145deg,#0c2856,#1f6cf1); font-size:25px; font-weight:900; box-shadow:0 14px 32px rgba(31,94,255,.20); }
.rich-empty strong { display:block; margin-bottom:8px; font-size:20px; }
.rich-empty p { margin:0; color:var(--muted); }
.breadcrumb { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:28px; color:var(--muted); font-size:13px; }
.breadcrumb a:hover { color:var(--blue); }
.listing-public-heading { padding-bottom:30px; border-bottom:1px solid var(--line); }
.refined-detail-layout { margin-top:30px; }
.listing-detail-placeholder { display:grid; min-height:320px; place-items:center; align-content:center; gap:10px; background:linear-gradient(135deg,#edf4ff,#ffffff); border-bottom:1px solid var(--line); }
.listing-detail-placeholder span { color:#1262ec; font-size:13px; font-weight:900; letter-spacing:.13em; }
.listing-detail-placeholder strong { font-size:34px; color:#17335f; }
.listing-content h2 { margin:10px 0 18px; font-size:30px; }
.content-subsection { margin-top:34px; padding-top:25px; border-top:1px solid var(--line); }
.content-subsection h3 { margin:0 0 10px; }
.side-intro { color:var(--muted); font-size:13px; }
.compact-notice { padding:16px; margin:20px 0; }

.publish-guide { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.publish-guide>div { padding:17px 18px; border:1px solid var(--line); border-radius:14px; background:var(--white); }
.publish-guide strong { display:block; margin-bottom:4px; }
.publish-guide span { color:var(--muted); font-size:12px; }
.polished-form { box-shadow:0 16px 50px rgba(12,31,66,.06); }

/* Refined footer */
.refined-footer { padding:58px 0 0; background:#f3f6fa; border-top:1px solid var(--line); }
.footer-grid { display:grid; grid-template-columns:1.35fr repeat(4,1fr); gap:38px; padding-bottom:45px; }
.footer-grid>div { display:flex; flex-direction:column; gap:9px; }
.footer-grid h4 { margin:0 0 6px; color:#1e2c43; }
.footer-grid a,.footer-grid span,.footer-grid p { color:#66738a; font-size:13px; }
.footer-grid a:hover { color:var(--blue); }
.footer-brand p { max-width:240px; margin:9px 0 0; }
.refined-footer .footer-bottom { min-height:62px; border-top:1px solid #dde4ee; }

/* Dark mode additions */
html[data-theme="dark"] .home-hero { background:linear-gradient(108deg,#0d1727,#101e33 58%,#0c1421); }
html[data-theme="dark"] .home-hero-copy h1 { color:var(--ink); }
html[data-theme="dark"] .home-hero-copy>p,html[data-theme="dark"] .hero-trust-row { color:#aebbd0; }
html[data-theme="dark"] .home-hero-visual::before { background:linear-gradient(145deg,rgba(17,28,44,.15),rgba(17,28,44,.75)); }
html[data-theme="dark"] .hero-hand-note { text-shadow:none; }
html[data-theme="dark"] .hero-hand-note small { color:#b9c5d8; }
html[data-theme="dark"] .home-market-showcase,html[data-theme="dark"] .home-category-cards>a,html[data-theme="dark"] .home-category-cards>div,html[data-theme="dark"] .home-service-grid>a,html[data-theme="dark"] .reason-grid article,html[data-theme="dark"] .horizontal-process article,html[data-theme="dark"] .editorial-note,html[data-theme="dark"] .update-grid article,html[data-theme="dark"] .market-category-browser,html[data-theme="dark"] .market-category-group,html[data-theme="dark"] .publish-guide>div { background:#111c2c; border-color:var(--line); }
html[data-theme="dark"] .home-category-cards strong,html[data-theme="dark"] .home-feed-title,html[data-theme="dark"] .home-editorial-table strong,html[data-theme="dark"] .market-parent-link strong { color:var(--ink); }
html[data-theme="dark"] .home-editorial-table .table-head,html[data-theme="dark"] .listing-cover-placeholder,html[data-theme="dark"] .listing-detail-placeholder { background:#0e1929; }
html[data-theme="dark"] .home-editorial-table>a:hover,html[data-theme="dark"] .market-category-group.active { background:#15243a; }
html[data-theme="dark"] .channel-hero { background:linear-gradient(120deg,#0d1727,#101e33); }
html[data-theme="dark"] .channel-side-note { background:rgba(17,28,44,.82); border-color:var(--line); }
html[data-theme="dark"] .market-child-links a { background:#0c1624; color:#aebbd0; }
html[data-theme="dark"] .refined-footer { background:#0a1320; }
html[data-theme="dark"] .footer-grid h4 { color:var(--ink); }
html[data-theme="dark"] .refined-footer .footer-bottom { border-color:var(--line); }
html[data-theme="dark"] .public-main-nav a { color:#b7c3d4; }
html[data-theme="dark"] .public-main-nav a.active { color:var(--blue); }
html[data-theme="dark"] .brand-wordmark span { color:#aebbd0; }

@media (max-width:1180px) {
  .public-main-nav { gap:13px; }
  .public-main-nav a { font-size:13px; }
  .desktop-only-link { display:none; }
  .home-hero-grid { grid-template-columns:1fr 430px; }
  .hero-hand-note { width:210px; right:0; bottom:40px; }
  .home-category-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .market-category-groups { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:1050px) {
  .nav-actions { margin-left:auto; }
  .public-main-nav { position:fixed; inset:73px 20px auto 20px; display:none; flex-direction:column; align-items:stretch; gap:0; padding:12px; border:1px solid var(--line); border-radius:16px; background:var(--white); box-shadow:var(--shadow); }
  body.nav-open .public-main-nav { display:flex; }
  .public-main-nav a { padding:12px 14px; }
  .public-main-nav a::after { display:none; }
  .nav-toggle { display:block; order:2; }
  .nav-actions { order:3; }
  .home-hero-grid { grid-template-columns:1fr 390px; }
  .hero-hand-note { display:none; }
  .dual-market-grid { grid-template-columns:1fr; }
  .home-service-grid,.reason-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .horizontal-process { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .horizontal-process article::after { display:none; }
  .editorial-info-grid { grid-template-columns:1fr 1fr; }
  .editorial-info-grid>div:first-child { grid-column:1/-1; }
  .footer-grid { grid-template-columns:1.4fr repeat(2,1fr); }
  .footer-grid>div:nth-child(4),.footer-grid>div:nth-child(5) { margin-top:12px; }
}
@media (max-width:760px) {
  .refined-nav-wrap { gap:10px; }
  .refined-brand .brand-copy strong { font-size:20px; }
  .brand-shield { width:31px; height:36px; }
  .brand-wordmark { gap:5px; }
  .brand-wordmark strong { font-size:19px; }
  .brand-wordmark span { font-size:10px; }
  .nav-actions .nav-text-link { display:none; }
  .nav-actions .nav-cta { min-height:40px; padding:0 13px; font-size:12px; }
  .home-hero-grid { grid-template-columns:1fr; }
  .home-hero-copy { padding:56px 0 30px; }
  .home-hero-copy h1 { font-size:40px; }
  .home-hero-visual { min-height:370px; justify-content:center; }
  .home-hero-visual img { height:430px; max-width:100%; }
  .home-market-overview { margin-top:0; padding-top:18px; }
  .home-category-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-editorial-table .table-head { display:none; }
  .home-editorial-table>a { grid-template-columns:minmax(0,1fr) auto; }
  .home-editorial-table>a span { grid-column:1; font-size:11px; }
  .home-editorial-table small { grid-column:2; grid-row:1/3; }
  .home-service-grid,.reason-grid,.update-grid { grid-template-columns:1fr; }
  .horizontal-process { grid-template-columns:1fr; }
  .editorial-info-grid { grid-template-columns:1fr; }
  .editorial-info-grid>div:first-child { grid-column:auto; }
  .channel-hero-grid { grid-template-columns:1fr; gap:25px; }
  .market-category-groups { grid-template-columns:1fr; }
  .human-toolbar { grid-template-columns:1fr; }
  .publish-guide { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .footer-brand { grid-column:1/-1; }
}
@media (max-width:520px) {
  .container { width:min(100% - 24px,1180px); }
  .home-hero-copy h1 { font-size:clamp(30px,8.8vw,36px); }
  .home-hero-copy h1 .hero-title-line { letter-spacing:-.055em; }
  .home-hero-copy>p { font-size:16px; }
  .hero-actions { flex-direction:column; align-items:stretch; }
  .hero-actions .btn { width:100%; }
  .hero-trust-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .home-category-cards { grid-template-columns:1fr; }
  .home-market-showcase>header { padding:20px 18px 14px; }
  .home-editorial-table>a { padding:10px 16px; }
  .center-section-head h2 { font-size:32px; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-brand { grid-column:auto; }
}
.demand-placeholder span { background:linear-gradient(145deg,#0d7f68,#24b894); }

/* 5.1.0 Friend links */
.friend-links-block { padding: 25px 0 30px; border-top: 1px solid #dde4ee; }
.friend-links-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.friend-links-heading h4 { margin: 0; color: #1e2c43; font-size: 16px; }
.friend-links-heading span { color: #8793a6; font-size: 12px; }
.friend-image-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.friend-image-links a { display: inline-flex; align-items: center; justify-content: center; min-width: 116px; height: 46px; padding: 7px 12px; border: 1px solid #dce3ec; border-radius: 10px; background: #fff; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.friend-image-links a:hover { transform: translateY(-2px); border-color: #adc5f5; box-shadow: 0 8px 20px rgba(18, 65, 135, .08); }
.friend-image-links img { display: block; max-width: 138px; max-height: 30px; width: auto; height: auto; object-fit: contain; }
.friend-text-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.friend-text-links a { color: #66738a; font-size: 13px; }
.friend-text-links a:hover { color: var(--blue); }
.admin-friend-logo { display: block; max-width: 130px; max-height: 38px; object-fit: contain; border-radius: 5px; background: #fff; }
.friend-current-image { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.friend-current-image span { font-size: 12px; color: var(--muted); }
.friend-current-image img { max-width: 180px; max-height: 60px; object-fit: contain; background: #fff; border-radius: 6px; padding: 5px; }
.inline-form { display: inline; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--blue); font: inherit; cursor: pointer; }
.danger-link { color: #c73d45; margin-left: 8px; }
html[data-theme="dark"] .friend-links-block { border-color: var(--line); }
html[data-theme="dark"] .friend-links-heading h4 { color: var(--ink); }
html[data-theme="dark"] .friend-image-links a { border-color: var(--line); background: #101c2b; }
html[data-theme="dark"] .friend-text-links a { color: #91a0b7; }
@media (max-width: 760px) {
  .friend-image-links { gap: 9px; }
  .friend-image-links a { min-width: 102px; height: 42px; padding: 6px 10px; }
  .friend-image-links img { max-width: 120px; max-height: 27px; }
  .friend-text-links { gap: 8px 16px; }
}
.friend-links-empty { color: #98a3b4; font-size: 13px; }

/* V6 multi-operator permissions and audit */
.operator-group-badge{display:inline-flex;align-items:center;padding:5px 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface-soft);color:var(--muted);font-size:12px;font-weight:800}
.operator-admin-grid,.permission-admin-grid{grid-template-columns:minmax(0,1.6fr) minmax(340px,.9fr);align-items:start}
.permission-matrix{display:grid;gap:14px}
.permission-matrix fieldset{margin:0;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}
.permission-matrix legend{padding:0 8px;font-weight:900;color:var(--text)}
.permission-option{display:flex!important;align-items:flex-start!important;gap:10px;margin:9px 0!important;padding:9px 10px;border-radius:10px;background:var(--surface)}
.permission-option input{width:auto!important;margin-top:4px}
.permission-option span{display:grid;gap:2px}
.permission-option small{color:var(--muted);font-size:11px;line-height:1.4}
.audit-table-wrap{overflow:auto}
.audit-table{min-width:1280px}
.audit-data-cell{min-width:360px;max-width:520px}
.audit-data-cell details{margin:5px 0;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft)}
.audit-data-cell summary{cursor:pointer;padding:7px 9px;font-weight:800;font-size:12px}
.audit-data-cell pre{max-height:240px;overflow:auto;margin:0;padding:10px;border-top:1px solid var(--line);white-space:pre-wrap;word-break:break-word;font-size:11px;line-height:1.55;color:var(--text)}
.brand-shield{display:inline-grid;width:32px;height:38px;place-items:center;color:#2563eb;flex:0 0 auto}
.brand-shield svg{display:block;width:100%;height:100%}
html[data-theme="dark"] .permission-option,html[data-theme="dark"] .permission-matrix fieldset,html[data-theme="dark"] .audit-data-cell details{background:#0e1929}
@media(max-width:1100px){.operator-admin-grid,.permission-admin-grid{grid-template-columns:1fr}.admin-account .operator-group-badge{display:none}}
