@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #15231f;
  --muted: #64736e;
  --line: #dce6e1;
  --paper: #f7faf8;
  --white: #ffffff;
  --green: #0a7356;
  --green-deep: #075440;
  --mint: #d9f3e8;
  --lime: #c9f261;
  --orange: #ef7d45;
  --shadow: 0 24px 70px rgba(23, 59, 48, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  width: 420px;
  height: 420px;
  background: rgba(187, 239, 217, 0.48);
  top: 90px;
  right: -180px;
}

.ambient-two {
  width: 280px;
  height: 280px;
  background: rgba(219, 244, 142, 0.25);
  top: 520px;
  left: -160px;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(10, 115, 86, 0.2);
}

.topbar-actions,
.account-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-copy {
  text-align: right;
}

.account-copy strong,
.account-copy small {
  display: block;
}

.account-copy strong {
  font-size: 13px;
}

.account-copy small {
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  font-size: 13px;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  padding: 9px 13px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
}

.status-pill span {
  width: 8px;
  height: 8px;
  background: #28ad78;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(40, 173, 120, 0.12);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 72px 16px 58px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  margin: 18px 0 22px;
  font-weight: 800;
}

.hero h1 em {
  color: var(--green);
  font-style: normal;
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  height: 9px;
  left: 2%;
  right: 0;
  bottom: 0;
  background: var(--lime);
  z-index: -1;
  border-radius: 99px;
  transform: rotate(-1deg);
}

.hero-copy {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 auto;
  font-size: 17px;
}

.hero-points {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.hero-points span {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: #50635c;
}

.workspace {
  max-width: 980px;
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 30px 18px;
  position: relative;
}

.steps::before {
  content: "";
  height: 1px;
  background: var(--line);
  position: absolute;
  top: 17px;
  left: 16%;
  right: 16%;
  z-index: -1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #87938f;
  font-size: 12px;
  font-weight: 600;
}

.step b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
}

.step.active,
.step.done {
  color: var(--green);
}

.step.active b {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 0 0 5px rgba(10, 115, 86, 0.1);
}

.step.done b {
  background: var(--mint);
  border-color: #a8dac7;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(211, 224, 218, 0.9);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 42px);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.panel-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-number {
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}

.panel h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0;
}

.file-rule,
.safe-label {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 9px;
  border-radius: 7px;
  background: #f0f5f2;
}

.dropzone {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px dashed #9fc4b6;
  background: linear-gradient(145deg, #f7fcf9, #f0f8f4);
  border-radius: 18px;
  cursor: pointer;
  padding: 30px;
  transition: 180ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--green);
  background: #effaf5;
  transform: translateY(-2px);
}

.dropzone.uploading {
  cursor: wait;
  opacity: 0.75;
}

.dropzone input {
  display: none;
}

.upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 18px;
  box-shadow: 0 12px 24px rgba(10, 115, 86, 0.22);
}

.dropzone strong {
  font-size: 17px;
}

.dropzone small {
  color: var(--muted);
  margin-top: 9px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  background: #f8fbf9;
  padding: 18px;
  border-radius: 15px;
}

.file-card > div {
  min-width: 0;
  flex: 1;
}

.file-card strong,
.file-card small {
  display: block;
}

.file-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card small {
  color: var(--muted);
  margin-top: 3px;
}

.file-badge {
  background: var(--mint);
  color: var(--green-deep);
  font-weight: 700;
  font-size: 11px;
  padding: 12px 9px;
  border-radius: 9px;
}

.file-list-card {
  border: 1px solid var(--line);
  background: #f8fbf9;
  border-radius: 15px;
  overflow: hidden;
}

.file-list-heading {
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.file-list-heading strong,
.file-list-heading small,
.uploaded-file strong,
.uploaded-file small {
  display: block;
}

.file-list-heading small,
.uploaded-file small {
  color: var(--muted);
  margin-top: 3px;
}

.uploaded-files {
  max-height: 360px;
  overflow: auto;
}

.uploaded-file {
  display: grid;
  grid-template-columns: 30px auto minmax(0, 1fr) minmax(130px, 190px);
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid #eaf0ed;
}

.uploaded-file:last-child {
  border-bottom: 0;
}

.uploaded-file > div {
  min-width: 0;
}

.uploaded-file strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.uploaded-file small {
  font-size: 11px;
}

.file-order {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.inline-sheet-select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 0 9px;
}

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

.single-field {
  max-width: 460px;
}

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

.rule-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbf9;
}

.rule-grid b {
  font-size: 14px;
}

.rule-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 8px 0 0;
}

.rule-grid code {
  color: var(--green-deep);
  background: var(--mint);
  border-radius: 5px;
  padding: 1px 5px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  font-size: 13px;
  font-weight: 600;
}

.field select,
.field input {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fbfdfc;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
  transition: 150ms ease;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, #62736d 50%),
    linear-gradient(135deg, #62736d 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.field select:focus,
.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(10, 115, 86, 0.08);
}

.field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0;
  padding: 14px 16px;
  background: #f7faf8;
  border-radius: 12px;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--green);
}

.checkbox-row strong,
.checkbox-row small {
  display: block;
}

.checkbox-row strong {
  font-size: 13px;
}

.checkbox-row small {
  color: var(--muted);
  margin-top: 3px;
}

.preview-block {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  margin-top: 24px;
}

.preview-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  background: #f4f8f6;
  border-bottom: 1px solid var(--line);
}

.preview-title h3 {
  margin: 0;
  font-size: 14px;
}

.preview-title span {
  color: var(--muted);
  font-size: 11px;
}

.table-wrap {
  overflow: auto;
  max-height: 330px;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  max-width: 260px;
  padding: 11px 13px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #edf1ef;
  border-right: 1px solid #edf1ef;
}

th {
  background: #fafcfb;
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 600;
}

.primary-button,
.secondary-button {
  border: 0;
  text-decoration: none;
  min-height: 52px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 700;
  cursor: pointer;
}

.compact-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.danger-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #efc2b8;
  border-radius: 9px;
  color: #a23f2a;
  background: #fff8f6;
  font-weight: 700;
  cursor: pointer;
}

.danger-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.optimization-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.optimization-metrics div {
  border: 1px solid var(--line);
  background: #f8fbf9;
  border-radius: 13px;
  padding: 17px;
}

.optimization-metrics small,
.optimization-metrics strong {
  display: block;
}

.optimization-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.optimization-metrics strong {
  margin-top: 8px;
  font-size: 22px;
}

.result-summary {
  margin-top: 18px;
  padding: 18px 20px;
  background: #f5f9f7;
  border-radius: 13px;
}

.result-summary p {
  margin: 0;
  font-weight: 600;
}

.result-summary ul {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  margin: 10px 0 0;
  padding-left: 20px;
}

.branch-actions,
.inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.branch-actions {
  grid-template-columns: 1fr;
}

.branch-actions .primary-button,
.branch-actions .secondary-button,
.inline-actions .primary-button,
.inline-actions .secondary-button {
  width: 100%;
  margin: 0;
}

.strong-button {
  border-color: #a8d9c7;
  background: #f3fbf7;
  color: var(--green-deep);
}

.download-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.download-list .primary-button,
.download-list .secondary-button {
  width: 100%;
  margin: 0;
  padding: 12px 18px;
  justify-content: space-between;
}

.download-list a span,
.download-list a small {
  display: block;
  text-align: left;
}

.download-list a small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  margin-top: 3px;
}

.download-list a b {
  font-size: 18px;
}

.compact-list {
  margin-top: 10px;
}

.compact-download {
  min-height: 42px;
  font-size: 12px;
}

.download-result-row {
  min-height: 48px;
}

#final-downloads a small {
  color: rgba(255, 255, 255, 0.78);
}

.centered-button {
  display: block;
  margin: 16px auto 0;
}

.primary-button {
  width: 100%;
  color: white;
  background: var(--green);
  margin-top: 26px;
  box-shadow: 0 12px 26px rgba(10, 115, 86, 0.2);
  transition: 160ms ease;
}

.primary-button:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 20px;
  background: white;
}

.text-button {
  border: 0;
  background: none;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}

.running-label,
.queued-label,
.completed-label,
.partial-label,
.failed-label,
.cancelled-label {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.running-label,
.queued-label {
  background: #fff0df;
  color: #a05a22;
}

.completed-label {
  background: var(--mint);
  color: var(--green-deep);
}

.partial-label,
.failed-label,
.cancelled-label {
  background: #ffe9e3;
  color: #b24f37;
}

.progress-visual {
  background: #f5f9f7;
  border-radius: 15px;
  padding: 24px;
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.progress-copy strong {
  font-size: 36px;
  letter-spacing: -0.04em;
}

.progress-copy span {
  color: var(--muted);
}

.progress-track {
  background: #dce9e3;
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2eaf82);
  border-radius: inherit;
  transition: width 300ms ease;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metrics div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.metrics small,
.metrics strong {
  display: block;
}

.metrics small {
  color: var(--muted);
  font-size: 11px;
}

.metrics strong {
  margin-top: 7px;
  font-size: 17px;
}

.result-actions {
  margin-top: 24px;
}

.result-actions .primary-button {
  margin: 0;
}

.result-actions .text-button {
  display: block;
  margin: 16px auto 0;
}

.notice {
  padding: 13px 16px;
  border-radius: 11px;
  margin-bottom: 18px;
  font-size: 13px;
}

.notice.error {
  color: #9c3f2c;
  background: #ffebe6;
  border: 1px solid #ffd1c5;
}

.notice.success {
  color: var(--green-deep);
  background: var(--mint);
  border: 1px solid #b9e4d3;
}

.how-it-works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 980px;
  margin: 70px auto;
}

.how-it-works div {
  border-top: 1px solid var(--line);
  padding: 22px 5px;
}

.how-it-works span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.how-it-works h3 {
  margin: 13px 0 9px;
}

.how-it-works p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 25px 0 36px;
  font-size: 12px;
}

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.tool-breadcrumb a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.tool-breadcrumb strong {
  color: var(--ink);
}

.toolbox-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 70px;
  padding: 62px 54px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 15%, rgba(201, 242, 97, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(226, 247, 239, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.toolbox-hero h1 {
  max-width: 760px;
  margin: 16px 0 22px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.toolbox-hero h1 em {
  color: var(--green);
  font-style: normal;
}

.toolbox-hero > div > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.toolbox-overview {
  width: 220px;
  height: 220px;
  justify-self: end;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(10, 115, 86, 0.14);
  border-radius: 50%;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 25px 60px rgba(18, 74, 57, 0.12);
  backdrop-filter: blur(12px);
}

.toolbox-overview span,
.toolbox-overview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.toolbox-overview strong {
  margin: 2px 0 -2px;
  font-size: 78px;
  line-height: 1;
  letter-spacing: -0.08em;
}

.toolbox-section {
  padding: 78px 0 92px;
}

.toolbox-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.toolbox-heading .eyebrow {
  margin: 0 0 6px;
}

.toolbox-heading h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.toolbox-count {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-size: 12px;
}

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

.tool-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: inherit;
  background: var(--white);
  text-decoration: none;
  box-shadow: 0 16px 45px rgba(23, 59, 48, 0.06);
}

a.tool-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

a.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 115, 86, 0.32);
  box-shadow: 0 24px 60px rgba(23, 59, 48, 0.13);
}

.tool-card.featured {
  background:
    radial-gradient(circle at 88% 4%, rgba(201, 242, 97, 0.35), transparent 30%),
    var(--white);
}

.tool-card.domain-card {
  background:
    radial-gradient(circle at 88% 4%, rgba(239, 125, 69, 0.18), transparent 32%),
    var(--white);
}

.domain-icon {
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(239, 125, 69, 0.22);
}

.tool-card.coming-soon {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
}

.tool-card-top,
.tool-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tool-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: var(--green);
  font-size: 19px;
  font-weight: 800;
}

.muted-icon {
  color: var(--green);
  background: var(--mint);
}

.tool-state {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--mint);
  font-size: 11px;
  font-weight: 700;
}

.tool-state.neutral {
  color: var(--muted);
  background: #edf2ef;
}

.tool-card-copy {
  margin: 30px 0;
}

.tool-card-copy p {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.tool-card-copy h3 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.tool-card-copy > span {
  display: block;
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.tool-card-meta {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.tool-card-meta b {
  color: var(--green);
  font-size: 13px;
}

.auth-screen {
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
  padding: 30px 20px 90px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 8px 0 10px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.auth-card > p:not(.eyebrow) {
  color: var(--muted);
  margin: 0 0 26px;
  line-height: 1.7;
}

.auth-card .field {
  margin-top: 16px;
}

.auth-card .notice {
  margin: 16px 0 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 32, 26, 0.52);
  backdrop-filter: blur(7px);
}

.admin-dialog {
  width: min(1000px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 30px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(5, 35, 26, 0.3);
}

.admin-heading,
.account-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-heading h2,
.account-list-heading h3,
.account-create-form h3 {
  margin: 0;
}

.admin-heading .eyebrow {
  margin: 0 0 5px;
}

.account-create-form {
  margin: 25px 0;
  padding: 20px;
  border-radius: 16px;
  background: #f5f9f7;
}

.account-form-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 15px;
}

.account-form-grid .primary-button {
  width: auto;
  min-width: 120px;
  margin: 0;
  padding-inline: 20px;
}

.account-list-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-list-heading span {
  color: var(--muted);
  font-size: 12px;
}

.account-list {
  display: grid;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px minmax(180px, 0.9fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #e8efeb;
}

.account-identity {
  align-self: center;
}

.account-identity strong,
.account-identity small {
  display: block;
}

.account-identity small {
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}

.compact-field {
  display: grid;
  gap: 5px;
}

.compact-field span {
  color: var(--muted);
  font-size: 11px;
}

.compact-field input,
.compact-field select {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hidden {
  display: none !important;
}

.domain-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 70px;
  padding: 68px 54px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 10%, rgba(239, 125, 69, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 248, 241, 0.9));
  box-shadow: var(--shadow);
}

.domain-hero h1 {
  margin: 14px 0 20px;
  font-size: clamp(42px, 5.5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.domain-hero h1 em {
  color: var(--green);
  font-style: normal;
}

.domain-hero > div > p:last-child {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.domain-flow {
  list-style: none;
  margin: 0;
  padding: 22px;
  border: 1px solid rgba(10, 115, 86, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
}

.domain-flow li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.domain-flow li + li {
  border-top: 1px solid var(--line);
}

.domain-flow b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--green-deep);
  background: var(--mint);
}

.domain-panel {
  margin: 30px 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 16px 45px rgba(23, 59, 48, 0.06);
}

.domain-dropzone {
  margin-top: 24px;
}

.domain-dropzone.dragging {
  border-color: var(--green);
  background: #effaf5;
}

.domain-upload-summary,
.domain-metrics {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}

.domain-upload-summary {
  grid-template-columns: 1.5fr repeat(3, 0.7fr) 1.2fr;
}

.domain-metrics {
  grid-template-columns: repeat(5, 1fr);
}

.domain-upload-summary > div,
.domain-metrics > div {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbf9;
}

.domain-upload-summary small,
.domain-upload-summary strong,
.domain-metrics small,
.domain-metrics strong {
  display: block;
}

.domain-upload-summary small,
.domain-metrics small {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.domain-upload-summary strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-metrics strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.domain-source-confirm {
  margin: 26px 0;
  padding: 24px;
  border: 1px solid #efd8cc;
  border-radius: 18px;
  background: #fff8f4;
}

.domain-source-confirm h3 {
  margin: 6px 0 16px;
}

.condition-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.condition-grid span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #82513c;
  background: #ffebe1;
  font-size: 12px;
}

.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #efd8cc;
  color: #684b3d;
  font-size: 13px;
  line-height: 1.65;
}

.confirm-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.domain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.domain-table th,
.domain-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.domain-table th {
  color: var(--muted);
  background: #f6f9f7;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.domain-table code {
  color: var(--green-deep);
  background: transparent;
  font-size: 12px;
}

.job-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 17px 20px;
  border-radius: 15px;
  color: var(--green-deep);
  background: var(--mint);
}

.job-banner small,
.job-banner code {
  display: block;
}

.job-banner small {
  margin-bottom: 4px;
  font-size: 10px;
}

.job-banner p {
  margin: 0;
  font-size: 13px;
}

.stage-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.stage-progress-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.domain-progress-track {
  height: 9px;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8efeb;
}

.domain-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #44b48d);
  transition: width 240ms ease;
}

.review-flow-note {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.domain-result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  flex-wrap: wrap;
}

.domain-result-actions .secondary-button {
  width: auto;
  margin: 0;
  text-decoration: none;
}

.result-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.status-passed,
.status-in_progress {
  color: var(--green-deep);
  background: var(--mint);
}

.status-review {
  color: #8b5b14;
  background: #fff1c9;
}

.status-rejected {
  color: #963b2a;
  background: #ffe4de;
}

.status-pending {
  color: var(--muted);
  background: #edf2ef;
}

.empty-table {
  padding: 34px !important;
  color: var(--muted);
  text-align: center !important;
}

.domain-row-actions {
  min-width: 150px;
}

.domain-row-actions .text-button {
  padding: 3px 6px;
  font-size: 11px;
}

.review-pass {
  color: var(--green) !important;
}

.review-reject {
  color: #a23d2a !important;
}

.evidence-dialog {
  width: min(920px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 30px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(5, 35, 26, 0.3);
}

.evidence-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.evidence-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbf9;
}

.evidence-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evidence-card-heading span {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-card-heading b {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--mint);
  font-size: 10px;
}

.evidence-card h3 {
  margin: 12px 0 8px;
  font-size: 16px;
}

.evidence-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.evidence-card small {
  display: inline-block;
  margin-right: 12px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.evidence-card details {
  margin-top: 12px;
}

.evidence-card summary {
  color: var(--green-deep);
  cursor: pointer;
  font-size: 12px;
}

.evidence-card pre {
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  color: #385048;
  background: #edf4f0;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .topbar,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    height: 72px;
  }

  .status-pill,
  .account-copy {
    display: none;
  }

  .topbar-actions,
  .account-menu {
    gap: 4px;
  }

  .hero {
    padding: 45px 5px 42px;
  }

  .tool-breadcrumb {
    padding-top: 10px;
  }

  .toolbox-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 42px 25px;
    border-radius: 22px;
  }

  .toolbox-hero h1 {
    font-size: 43px;
  }

  .toolbox-hero h1 br {
    display: none;
  }

  .toolbox-hero > div > p:last-child {
    font-size: 15px;
  }

  .toolbox-overview {
    width: 150px;
    height: 150px;
    justify-self: start;
  }

  .toolbox-overview strong {
    font-size: 56px;
  }

  .toolbox-section {
    padding: 50px 0 62px;
  }

  .toolbox-heading {
    align-items: center;
  }

  .tool-card-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 300px;
    padding: 23px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero h1 br {
    display: none;
  }

  .hero-copy {
    font-size: 15px;
  }

  .steps {
    margin-inline: 0;
  }

  .step span {
    font-size: 10px;
  }

  .panel {
    border-radius: 18px;
    padding: 22px 17px;
  }

  .panel-heading {
    flex-direction: column;
    gap: 10px;
  }

  .form-grid,
  .rule-grid,
  .optimization-metrics,
  .branch-actions,
  .inline-actions,
  .metrics,
  .how-it-works {
    grid-template-columns: 1fr;
  }

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

  .result-actions {
    display: block;
  }

  .uploaded-file {
    grid-template-columns: 28px auto minmax(0, 1fr);
  }

  .uploaded-file .inline-sheet-select {
    grid-column: 3;
  }

  .progress-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    gap: 7px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .admin-dialog {
    padding: 22px 17px;
  }

  .account-form-grid,
  .account-row {
    grid-template-columns: 1fr;
  }

  .account-actions {
    justify-content: flex-end;
  }

  .domain-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 38px 24px;
  }

  .domain-hero h1 {
    font-size: 42px;
  }

  .domain-upload-summary,
  .domain-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .domain-upload-summary > div:first-child {
    grid-column: 1 / -1;
  }

  .domain-panel {
    padding: 22px 16px;
  }

  .job-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}
