html {
  overflow-x: hidden;
}

.dog-page {
  --dog-green: #166534;
  --dog-green-dark: #14532d;
  --dog-green-soft: rgba(34, 197, 94, 0.12);
  --dog-line: rgba(22, 101, 52, 0.18);
  --dog-line-strong: rgba(22, 101, 52, 0.32);
  --dog-panel: rgba(255, 255, 255, 0.84);
  --dog-panel-strong: #f8fff8;
  --dog-ink: #10261a;
  --dog-muted: #4b5e52;
  --dog-amber: #d97706;
  --dog-sky: #2563eb;
  --dog-red: #dc2626;
  --dog-svg: #16301f;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(241, 253, 244, 0.92), rgba(255, 255, 255, 0.76) 360px, #f5faf6);
}

.dog-page .container {
  width: min(calc(100vw - 2rem), var(--content));
}

:root[data-theme="dark"] .dog-page {
  --dog-green: #86efac;
  --dog-green-dark: #bbf7d0;
  --dog-green-soft: rgba(34, 197, 94, 0.14);
  --dog-line: rgba(134, 239, 172, 0.16);
  --dog-line-strong: rgba(134, 239, 172, 0.3);
  --dog-panel: rgba(15, 23, 42, 0.84);
  --dog-panel-strong: #0f172a;
  --dog-ink: #f8fafc;
  --dog-muted: #cbd5e1;
  --dog-amber: #fbbf24;
  --dog-sky: #93c5fd;
  --dog-red: #fca5a5;
  --dog-svg: #e2e8f0;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 22%),
    linear-gradient(180deg, #020617, #0f172a 360px, #020617);
}

.dog-page .site-header {
  background: rgba(241, 253, 244, 0.82);
  border-bottom-color: var(--dog-line);
}

:root[data-theme="dark"] .dog-page .site-header {
  background: rgba(2, 6, 23, 0.84);
}

.dog-page .logo,
.dog-page h1,
.dog-page h2,
.dog-page h3,
.dog-page h4 {
  letter-spacing: 0;
}

.dog-page [hidden] {
  display: none !important;
}

.dog-hero {
  padding: 3.1rem 0 1.8rem;
}

.dog-hero-grid,
.dog-calculator-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.94fr);
  align-items: start;
}

.dog-hero-grid > *,
.dog-calculator-grid > *,
.behavior-grid > *,
.material-explain-grid > *,
.dog-related-grid > * {
  min-width: 0;
}

.dog-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.42rem 0.78rem;
  border: 1px solid var(--dog-line);
  border-radius: 999px;
  background: var(--dog-green-soft);
  color: var(--dog-green-dark);
  font-weight: 900;
}

.dog-hero h1 {
  margin: 0.62rem 0 0.35rem;
  text-wrap: balance;
}

.dog-subtitle,
.dog-tip,
.dog-warning,
.share-output,
.field-help,
.result-summary dd,
.result-block p,
.dog-related-card p,
.dog-info-card p,
.quick-head p {
  color: var(--dog-muted);
}

.dog-subtitle {
  max-width: 940px;
  margin: 0;
  font-size: 1.08rem;
}

.dog-visual-card,
.quick-card,
.dog-tool-panel,
.dog-results-panel,
.dog-info-card,
.dog-related-card {
  border: 1px solid var(--dog-line);
  border-radius: 20px;
  background: var(--dog-panel);
  box-shadow: var(--shadow-soft);
}

.dog-visual-card {
  padding: 1rem;
  color: var(--dog-svg);
}

.dog-visual-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.dog-svg-fence,
.dog-svg-dog {
  color: currentColor;
}

.dog-svg-fence rect,
.dog-svg-fence path,
.dog-svg-dog ellipse,
.dog-svg-dog circle,
.dog-svg-dog path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dog-svg-fence .dog-apron {
  stroke: var(--dog-amber);
  stroke-dasharray: 7 8;
}

.dog-svg-dog ellipse {
  fill: rgba(34, 197, 94, 0.1);
}

.quick-card,
.dog-tool-panel,
.dog-results-panel {
  padding: 1rem;
}

.quick-card {
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.82)),
    #f0fdf4;
}

:root[data-theme="dark"] .quick-card {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(22, 101, 52, 0.18)),
    #0f172a;
}

.quick-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.quick-head h2,
.dog-tool-head h2,
.section-heading h2,
.result-head h3 {
  margin: 0;
  font-family: var(--font-heading);
}

.quick-head h2 {
  font-size: 1.18rem;
  text-transform: uppercase;
}

.dog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.76rem 1rem;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  background: #14532d;
  color: #fff;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.18);
}

.dog-button.wide {
  width: 100%;
}

.dog-button:hover,
.dog-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.dog-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--dog-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-overflow-scrolling: touch;
}

.dog-table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
}

.dog-table th,
.dog-table td {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--dog-line);
  vertical-align: top;
}

.dog-table th {
  background: rgba(34, 197, 94, 0.06);
  color: var(--dog-green-dark);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dog-table tr:last-child td {
  border-bottom: 0;
}

.dog-table td:first-child {
  font-weight: 800;
}

.dog-calculator-grid {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.92fr);
}

.dog-tool-head,
.result-head,
.result-total,
.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.dog-tool-head {
  margin-bottom: 1rem;
}

.dog-tool-head p,
.result-head span {
  color: var(--dog-muted);
  font-weight: 700;
}

.dog-mode-switch,
.dog-segmented,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dog-mode-switch button,
.dog-segmented button,
.dog-step-nav button,
.result-actions button {
  min-height: 42px;
  border: 1px solid var(--dog-line);
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  font-weight: 800;
}

:root[data-theme="dark"] .dog-mode-switch button,
:root[data-theme="dark"] .dog-segmented button,
:root[data-theme="dark"] .dog-step-nav button,
:root[data-theme="dark"] .result-actions button {
  background: rgba(255, 255, 255, 0.05);
}

.dog-mode-switch button[aria-pressed="true"],
.dog-segmented button.is-active,
.dog-option-grid button.is-active,
.dog-material-grid button.is-active,
.height-options button.is-active {
  border-color: var(--dog-line-strong);
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.12), rgba(34, 197, 94, 0.08));
  color: var(--dog-green-dark);
}

.dog-progress {
  height: 10px;
  overflow: hidden;
  margin: 0 0 1rem;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.12);
}

.dog-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #166534, #22c55e);
  transition: width 180ms ease;
}

.wizard-panel,
.expert-panel {
  display: grid;
  gap: 1rem;
}

.dog-step {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid var(--dog-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.24);
}

:root[data-theme="dark"] .dog-step {
  background: rgba(255, 255, 255, 0.03);
}

.dog-step h3,
.dog-info-card h3,
.dog-related-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.12rem;
}

.dog-step h4 {
  margin: 0.35rem 0 0;
  font-size: 0.98rem;
}

.dog-option-grid,
.dog-material-grid,
.dog-check-grid,
.behavior-grid,
.material-explain-grid,
.dog-related-grid {
  display: grid;
  gap: 0.75rem;
}

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

.dog-option-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dog-option-grid button,
.dog-material-grid button {
  display: grid;
  gap: 0.25rem;
  min-height: 124px;
  padding: 0.85rem;
  border: 1px solid var(--dog-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  text-align: left;
}

.dog-option-grid button strong,
.dog-material-grid button strong {
  font-size: 1rem;
}

.dog-option-grid button span,
.dog-material-grid button span {
  color: var(--dog-muted);
  font-weight: 600;
}

.dog-field-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dog-field-grid label,
.wide-label {
  display: grid;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 800;
}

.dog-field-grid input,
.dog-field-grid select,
.wide-label select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--dog-line);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  background: var(--bg-elevated);
  color: var(--text);
}

.dog-field-grid label[data-entry="dimensions"],
.dog-field-grid label[data-entry="partial"],
.dog-field-grid label[data-entry="total"] {
  display: none;
}

.dog-field-grid.is-total label[data-entry="total"],
.dog-field-grid.is-dimensions label[data-entry="dimensions"],
.dog-field-grid.is-partial label[data-entry="partial"] {
  display: grid;
}

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

.dog-check-grid label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.8rem;
  border: 1px solid var(--dog-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  font-weight: 700;
}

.dog-check-grid span {
  color: var(--dog-muted);
  font-weight: 600;
}

.dog-warning,
.recommendation {
  margin: 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--dog-amber);
  border-radius: 0 14px 14px 0;
  background: rgba(217, 119, 6, 0.1);
  font-weight: 650;
}

.dog-warning {
  border-left-color: var(--dog-red);
  background: rgba(220, 38, 38, 0.08);
  color: var(--text);
}

.dog-results-panel {
  display: grid;
  gap: 0.9rem;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(22, 101, 52, 0.86)),
    #0f172a;
  color: #f8fafc;
}

.dog-results-panel .result-head span,
.dog-results-panel .field-help,
.dog-results-panel .share-output,
.dog-results-panel .result-summary dd,
.dog-results-panel .result-block p {
  color: rgba(248, 250, 252, 0.8);
}

.dog-results-panel .dog-warning {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  color: #fef3c7;
}

.dog-results-panel .result-head span {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dog-result-visual {
  min-height: 170px;
  border-radius: 16px;
  border: 1px solid rgba(248, 250, 252, 0.1);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.09), transparent 22%),
    rgba(255, 255, 255, 0.05);
}

.dog-result-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

.result-summary {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.result-summary div {
  display: grid;
  gap: 0.1rem;
}

.result-summary dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.68);
  font-weight: 800;
}

.result-summary dd {
  margin: 0;
  font-weight: 700;
}

.result-block {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-block h4 {
  margin: 0;
  font-family: var(--font-heading);
}

.result-line,
.result-total div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.result-line + .result-line {
  padding-top: 0.2rem;
}

.result-total {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-total span {
  display: block;
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.88rem;
  font-weight: 700;
}

.result-total strong {
  font-size: 1.35rem;
}

.result-actions {
  flex-wrap: wrap;
}

.result-actions button {
  flex: 1 1 140px;
  color: inherit;
}

.share-output {
  margin: 0;
  min-height: 1.5em;
  font-size: 0.92rem;
  word-break: break-word;
}

.section {
  padding: 2rem 0 3rem;
}

.section-heading {
  max-width: 950px;
}

.section-heading h2 {
  font-size: 2.35rem;
  line-height: 1.08;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: var(--dog-green-soft);
  color: var(--dog-green-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.behavior-grid,
.material-explain-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.dog-info-card,
.dog-related-card {
  padding: 1rem;
}

.dog-info-card.warning {
  border-color: rgba(220, 38, 38, 0.22);
}

.dog-info-card ul {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
}

.dog-tip {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border-left: 4px solid var(--dog-green);
  border-radius: 0 14px 14px 0;
  background: rgba(22, 101, 52, 0.08);
  font-weight: 650;
}

.dog-related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dog-related-card span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.12);
  color: var(--dog-green-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.dog-related-card a {
  display: inline-flex;
  margin-top: 0.8rem;
  color: var(--dog-green-dark);
  font-weight: 850;
}

.dog-faq {
  display: grid;
  gap: 0.85rem;
}

.dog-faq details {
  overflow: hidden;
  border: 1px solid var(--dog-line);
  border-radius: 18px;
  background: var(--dog-panel);
  box-shadow: var(--shadow-soft);
}

.dog-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 850;
  list-style: none;
}

.dog-faq summary::-webkit-details-marker {
  display: none;
}

.dog-faq summary::after {
  content: "+";
  color: var(--dog-green);
  font-size: 1.35rem;
  line-height: 1;
}

.dog-faq details[open] summary::after {
  content: "-";
}

.dog-faq details > div {
  padding: 0 1.1rem 1.1rem;
}

.dog-faq p {
  margin: 0;
  color: var(--dog-muted);
}

@media (max-width: 1080px) {
  .dog-hero-grid,
  .dog-calculator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .behavior-grid,
  .material-explain-grid,
  .dog-related-grid,
  .dog-option-grid.compact,
  .dog-check-grid {
    grid-template-columns: 1fr;
  }

  .quick-head,
  .dog-tool-head,
  .result-head,
  .result-total {
    flex-direction: column;
    align-items: flex-start;
  }

  .dog-option-grid {
    grid-template-columns: 1fr;
  }

  .dog-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dog-hero {
    padding-top: 2.6rem;
  }

  .dog-hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .dog-table {
    min-width: 640px;
  }

  .dog-button,
  .result-actions button {
    width: 100%;
  }

  .dog-results-panel {
    padding: 0.9rem;
  }
}

@media (max-width: 520px) {
  .dog-page .container {
    width: min(calc(100vw - 2rem), 360px);
    margin-inline: 1rem;
  }

  .dog-hero h1,
  .section-heading h2 {
    overflow-wrap: anywhere;
  }
}
