/* ========================================
   Concrete Calculator - Dark Tool Station Style
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ========================================
   CSS Variables
   ======================================== */
:root {
  /* Light Theme */
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f5f7;
  --bg-elevated: #ebedf0;

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-default: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);

  /* Text */
  --text-primary: #1a1a1e;
  --text-secondary: #6b6b76;
  --text-tertiary: #9898a0;

  /* Accent - Indigo */
  --accent: #4f46e5;
  --accent-hover: #6366f1;
  --accent-subtle: rgba(79, 70, 229, 0.08);
  --accent-glow: rgba(79, 70, 229, 0.15);

  /* Semantic Colors */
  --success: #16a34a;
  --warning: #d97706;
  --error: #dc2626;
  --error-subtle: rgba(220, 38, 38, 0.08);

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Selection */
::selection {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0;
  color: var(--text-secondary);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.8;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition-fast);
}

.nav-links a:hover::after {
  width: 100%;
}

.compact-header {
  background: rgba(10, 10, 15, 0.9);
}

/* ========================================
   Buttons
   ======================================== */
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 40px;
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.primary-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.primary-button:active {
  transform: translateY(0);
}

.secondary-button {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.secondary-button:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 0 5px var(--accent-glow);
}

/* ========================================
   Calculator Section
   ======================================== */
.calculator-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  animation: fadeInUp 0.5s ease forwards;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h1,
.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  max-width: 720px;
  font-size: 0.95rem;
}

.calculator-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#calculator-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========================================
   Shape Panel
   ======================================== */
.shape-panel {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  column-gap: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: all var(--transition-normal);
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.shape-panel:nth-child(1) { animation-delay: 0.1s; }
.shape-panel:nth-child(2) { animation-delay: 0.15s; }
.shape-panel:nth-child(3) { animation-delay: 0.2s; }
.shape-panel:nth-child(4) { animation-delay: 0.25s; }
.shape-panel:nth-child(5) { animation-delay: 0.3s; }

.shape-panel:hover {
  border-color: var(--border-hover);
}

.shape-panel h3 {
  grid-column: 1 / -1;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.shape-content {
  display: contents;
}

.shape-visual {
  grid-column: 1;
  grid-row: 2 / span 2;
  margin: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: visible;
  min-height: 210px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape-visual svg,
.shape-visual img {
  width: 100%;
  height: 100%;
  max-height: 174px;
  object-fit: contain;
  display: block;
}

.shape-visual text {
  fill: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.dim-label {
  fill: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.shape-top {
  fill: #2a2a3a;
  stroke: #4a4a5a;
  stroke-width: 2;
}

.shape-side {
  fill: #222230;
  stroke: #4a4a5a;
  stroke-width: 2;
}

.shape-front,
.shape-accent {
  fill: #363648;
  stroke: #4a4a5a;
  stroke-width: 2;
}

.shape-hole {
  fill: var(--bg-tertiary);
  stroke: #4a4a5a;
  stroke-width: 2;
}

.shape-line {
  stroke: var(--accent);
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-width: 2;
}

.shape-description {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  margin-top: 8px;
}

.shape-actions {
  grid-column: 2;
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 540px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* ========================================
   Form Elements
   ======================================== */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 540px;
}

.field {
  display: grid;
  grid-template-columns: minmax(132px, 160px) minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
}

.input-row {
  display: flex;
  width: 100%;
  max-width: 360px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
  min-height: 38px;
  box-shadow: var(--shadow-sm);
}

.input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-sm);
}

.input-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0 12px;
  color: var(--text-primary);
  font-weight: 500;
}

.input-row input:focus {
  outline: none;
}

.input-row input::placeholder {
  color: var(--text-tertiary);
}

.input-row select {
  background: var(--bg-tertiary);
  border: none;
  border-left: 1px solid var(--border-default);
  padding: 0 10px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 108px;
}

.input-row select:focus {
  outline: none;
  color: var(--text-primary);
}

.input-row.single {
  max-width: 140px;
}

.input-row.single input {
  width: 100%;
}

.error {
  color: var(--error);
  font-size: 0.8rem;
  grid-column: 2;
  line-height: 1.35;
}

.error:empty {
  display: none;
}

.field.invalid .input-row {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-subtle);
}

.field.invalid .error {
  display: block;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding-left: 16px;
}

/* ========================================
   Scroll offset for sticky header
   ======================================== */
[id] {
  scroll-margin-top: 88px;
}

/* ========================================
   Content Band / How to Use
   ======================================== */
.content-band {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 64px 24px;
}

.content-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  counter-increment: steps;
  transition: all var(--transition-fast);
}

.steps-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.steps-list li:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.steps-list p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.steps-list {
  counter-reset: steps;
}

/* ========================================
   Content Section / Formulas & FAQ
   ======================================== */
.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading p {
  margin-top: 8px;
  font-size: 0.95rem;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.formula-grid article {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-fast);
}

.formula-grid article:hover {
  border-color: var(--border-hover);
}

.formula-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.formula-grid p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ========================================
   FAQ
   ======================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.faq-list details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-list details:hover {
  border-color: var(--border-hover);
}

.faq-list details[open] {
  border-color: var(--accent);
}

.faq-list summary {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

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

.faq-list summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-tertiary);
  transition: transform var(--transition-fast);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list p {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   Result Page
   ======================================== */
.result-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.inline-result {
  width: 100%;
  padding: 10px 0 0;
  scroll-margin-top: 88px;
}

.inline-result[hidden] {
  display: none;
}

.result-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.compact-result-layout {
  grid-template-columns: 1fr;
}

.results-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  animation: fadeInUp 0.5s ease forwards;
}

.results-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.results-header .eyebrow {
  margin-bottom: 4px;
}

.results-header h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.results-header p:last-child {
  margin-bottom: 0;
}

.hero-result {
  background: linear-gradient(135deg, var(--accent-subtle), rgba(79, 70, 229, 0.03));
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.hero-result span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-result strong {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.result-grid > div {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-fast);
}

.result-grid > div:hover {
  border-color: var(--border-hover);
}

.result-grid dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.result-grid dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.compact-results-header {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  column-gap: 16px;
  align-items: end;
}

.compact-results-header .eyebrow {
  grid-column: 1 / -1;
}

.compact-results-header h2 {
  margin-bottom: 0;
}

.compact-results-header p:last-child {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: right;
}

.result-compact {
  display: grid;
  gap: 10px;
}

.volume-result {
  display: grid;
  grid-template-columns: 140px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.result-label {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.volume-result p,
.density-copy {
  margin: 0;
  line-height: 1.35;
}

.volume-result strong,
.result-table dd span,
.density-copy strong {
  font-weight: 800;
}

.result-number {
  font-weight: 800;
}

.volume-number {
  color: #0f766e;
}

.weight-number {
  color: #b45309;
}

.bag-number {
  color: #4338ca;
}

.density-copy {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.result-table {
  display: grid;
  margin: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.result-table > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.result-table > div:first-child {
  border-top: none;
}

.result-table dt {
  color: var(--text-secondary);
  font-weight: 700;
}

.result-table dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.result-note {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin: 0;
}

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

.result-details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 80px;
  animation: fadeInUp 0.5s ease 0.1s forwards;
  opacity: 0;
}

.result-details h2 {
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-list > div {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.detail-list > div:first-child {
  border-top: none;
  padding-top: 0;
}

.detail-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.detail-list dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Loading state */
.loading .hero-result strong {
  animation: pulse 1.5s ease infinite;
  background: none;
  -webkit-text-fill-color: var(--text-primary);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .shape-panel {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .shape-visual {
    min-height: 188px;
  }

  .shape-visual svg,
  .shape-visual img {
    max-height: 152px;
  }

  .input-row {
    max-width: 340px;
  }

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

@media (max-width: 900px) {
  .result-layout {
    grid-template-columns: 1fr;
  }

  .result-details {
    position: static;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .shape-panel {
    display: block;
  }

  .shape-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .shape-visual {
    min-height: 148px;
    padding: 12px;
  }

  .shape-visual svg,
  .shape-visual img {
    max-height: 124px;
  }

  .field {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .field-label {
    text-align: left;
  }

  .shape-actions {
    max-width: none;
  }

  .error {
    grid-column: auto;
  }

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

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

  .topbar {
    padding: 12px 16px;
  }

  .nav-links {
    gap: 16px;
  }

  .calculator-section,
  .content-section,
  .content-band {
    padding: 40px 16px;
  }
}

@media (max-width: 540px) {
  .compact-results-header {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .compact-results-header p:last-child {
    text-align: left;
  }

  .volume-result {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .result-table > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .result-table dd {
    text-align: left;
  }

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

  .result-actions {
    flex-direction: column;
  }

  .shape-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
