:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --paper: #ffffff;
  --ink: #17211f;
  --muted: #62716c;
  --quiet: #eef3ef;
  --line: #d7dfd9;
  --line-strong: #b8c5be;
  --deep: #102521;
  --green: #16785e;
  --blue: #235fc7;
  --amber: #a96b18;
  --rose: #b24150;
  --violet: #6550aa;
  --cyan: #087a92;
  --coral: #c8503d;
  --shadow: 0 18px 44px rgba(20, 31, 28, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Aptos, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    linear-gradient(90deg, rgba(23, 33, 31, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 33, 31, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 4%, rgba(35, 95, 199, 0.11), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(22, 120, 94, 0.13), transparent 24rem),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

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

p,
dl,
ul {
  margin: 0;
}

.app-shell,
.share-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 58px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand,
.top-actions,
.action-row,
.hero-actions,
.auth-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  min-width: 0;
}

.mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--green));
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(22, 120, 94, 0.22);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand span span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn,
.tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 15px;
  color: #fff;
  background: var(--deep);
  font-weight: 950;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover,
.tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16, 37, 33, 0.14);
}

.btn.accent {
  background: var(--green);
}

.btn.ghost,
.tab {
  color: var(--deep);
  background: #e8efed;
}

.btn.danger {
  background: var(--rose);
}

.tab.active {
  color: #fff;
  background: var(--deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.42fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.service-card,
.feature,
.estimator-panel,
.tiers article,
.workflow,
.account-panel,
.panel,
.auth-card,
.metric,
.file-card,
.share-hero,
.share-file {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 54px);
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.75)),
    linear-gradient(135deg, rgba(35, 95, 199, 0.13), rgba(22, 120, 94, 0.12));
}

.hero h1 {
  max-width: 820px;
  margin: 10px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 690px;
  color: #40504b;
  font-size: 18px;
  line-height: 1.78;
  font-weight: 700;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 26px;
}

.service-card {
  min-height: 430px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-label {
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.service-card ul {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.service-card li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 850;
}

.service-status,
.alert {
  padding: 13px 14px;
  border: 1px solid rgba(169, 107, 24, 0.24);
  border-radius: 8px;
  color: #6d4510;
  background: rgba(169, 107, 24, 0.1);
  font-size: 14px;
  font-weight: 850;
}

.section-grid,
.tiers,
.workflow {
  display: grid;
  gap: 12px;
}

.section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.feature,
.tiers article {
  min-height: 178px;
  padding: 20px;
  box-shadow: none;
}

.feature span,
.workflow span {
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.feature h2,
.panel h2,
.account-panel h2,
.estimator-panel h2,
.share-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.feature p,
.muted,
.empty,
.share-file p,
.metric p,
.file-main p {
  color: var(--muted);
  line-height: 1.62;
}

.estimator-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.52fr) minmax(280px, 0.58fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 24px;
}

.estimate-form,
.stack {
  display: grid;
  gap: 14px;
}

.tiers {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.tiers strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
  line-height: 1;
}

.tiers span,
.pill {
  color: #31443f;
  font-size: 13px;
  font-weight: 950;
}

.workflow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 20px;
  margin-bottom: 18px;
}

.workflow div {
  padding: 4px 12px;
  border-left: 1px solid var(--line);
}

.workflow strong {
  display: block;
  margin: 8px 0 4px;
}

.account-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(340px, 0.48fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
}

.account-intro h2 {
  margin: 8px 0 10px;
}

.auth-card {
  padding: 20px;
  box-shadow: none;
}

.auth-tabs {
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #30413d;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c7d3ce;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(35, 95, 199, 0.62);
  box-shadow: 0 0 0 4px rgba(35, 95, 199, 0.1);
}

.quote-card {
  min-height: 174px;
  padding: 18px;
  border: 1px solid #cfd9d5;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 120, 94, 0.12), transparent 55%),
    rgba(238, 243, 239, 0.86);
}

.quote-price {
  display: block;
  margin: 8px 0 14px;
  font-size: 48px;
  line-height: 1;
}

.quote-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.quote-facts div {
  min-width: 0;
}

.quote-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quote-facts dd {
  margin: 3px 0 0;
  font-weight: 950;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.44fr);
  gap: 18px;
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel h1 {
  margin: 8px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 14px;
}

.metric {
  padding: 16px;
  box-shadow: none;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.metric strong {
  display: block;
  margin: 6px 0;
  font-size: 29px;
  line-height: 1;
}

.quota-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e3;
}

.quota-bar i {
  display: block;
  width: var(--pct, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.upload-drop {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 178px;
  padding: 20px;
  border: 2px dashed #b8c7c0;
  border-radius: 8px;
  background: rgba(238, 243, 239, 0.76);
}

.file-list {
  display: grid;
  gap: 12px;
}

.file-card {
  padding: 14px;
  box-shadow: none;
}

.file-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.file-main strong {
  display: block;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--quiet);
}

.notice {
  min-height: 22px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.notice.error {
  color: var(--rose);
}

.centered-card {
  width: min(560px, 100%);
  margin: 12vh auto;
}

.share-shell {
  width: min(980px, calc(100% - 32px));
}

.share-hero {
  display: grid;
  gap: 14px;
  padding: 34px;
}

.share-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-files {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.share-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  box-shadow: none;
}

.share-file strong {
  display: block;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.share-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.theme-dark {
  color-scheme: dark;
  --bg: #0c1117;
  --paper: #131b21;
  --ink: #edf4f2;
  --muted: #a8b5b1;
  --quiet: #202b31;
  --line: #27333a;
}

.accent-blue { --green: var(--blue); }
.accent-amber { --green: var(--amber); }
.accent-rose { --green: var(--rose); }
.accent-violet { --green: var(--violet); }
.accent-cyan { --green: var(--cyan); }
.accent-coral { --green: var(--coral); }
.accent-slate { --green: #4b6470; }

@media (max-width: 1040px) {
  .hero,
  .estimator-panel,
  .account-panel,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .service-card,
  .hero-copy {
    min-height: auto;
  }

  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell,
  .share-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .panel-head,
  .file-main,
  .share-file {
    display: grid;
    grid-template-columns: 1fr;
  }

  .top-actions,
  .action-row,
  .hero-actions {
    justify-content: stretch;
  }

  .btn,
  .tab {
    width: 100%;
  }

  .section-grid,
  .workflow,
  .metrics,
  .quote-facts,
  .control-grid,
  .tiers {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 50px);
  }

  .hero-copy,
  .service-card,
  .panel,
  .account-panel,
  .estimator-panel,
  .share-hero {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
