.dvm-pseo-panel {
  margin: clamp(2rem, 6vw, 4rem) 0;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--color-line);
  background: linear-gradient(145deg, var(--color-paper), var(--color-ivory));
  box-shadow: var(--shadow-soft);
}

.dvm-pseo-panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: 1.5rem;
}

.entry-content .dvm-pseo-panel__header h2 {
  margin: .3rem 0 0;
  font-size: clamp(1.65rem, 4vw, 2.65rem);
  line-height: 1.08;
}

.dvm-pseo-panel__header p,
.dvm-pseo-note,
.dvm-pseo-status { margin: 0; color: var(--color-muted); }

.dvm-pseo-kicker {
  display: block;
  color: var(--color-accent);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.dvm-pseo-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-line);
  background: var(--color-ivory);
}

.entry-content .dvm-pseo-table {
  width: 100%;
  min-width: 720px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
}

.entry-content .dvm-pseo-table th,
.entry-content .dvm-pseo-table td {
  padding: .9rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: middle;
}

.entry-content .dvm-pseo-table thead th {
  background: var(--color-ink);
  color: var(--color-ivory);
  font-size: .75rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.entry-content .dvm-pseo-table tbody tr:last-child > * { border-bottom: 0; }
.entry-content .dvm-pseo-table tbody th { max-width: 260px; font-size: .92rem; }
.entry-content .dvm-pseo-table tbody th a { text-decoration: none; }
.entry-content .dvm-pseo-table tbody th a:hover { text-decoration: underline; }
.dvm-pseo-row-link { white-space: nowrap; font-size: .85rem; font-weight: 700; }
.dvm-pseo-note { margin-top: .85rem; font-size: .83rem; }

.dvm-pseo-form {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--color-line);
  background: var(--color-ivory);
}

.dvm-pseo-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.dvm-pseo-fields--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dvm-pseo-fields label { display: flex; flex-direction: column; gap: .35rem; }
.dvm-pseo-fields label > span { font-size: .83rem; font-weight: 750; }
.dvm-pseo-fields small { color: var(--color-muted); font-size: .72rem; line-height: 1.35; }
.dvm-pseo-fields input {
  width: 100%;
  min-height: 48px;
  padding: .65rem .75rem;
  border: 1px solid var(--color-line);
  border-radius: 0;
  background: #fff;
  color: var(--color-ink);
}

.dvm-pseo-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
  border: 1px solid var(--color-line);
  background: var(--color-ivory);
}

.dvm-pseo-results > div {
  display: flex;
  min-height: 120px;
  padding: 1rem;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--color-line);
}

.dvm-pseo-results > div:last-child { border-right: 0; }
.dvm-pseo-results span { color: var(--color-muted); font-size: .76rem; font-weight: 700; }
.dvm-pseo-results strong { font-family: var(--font-display); font-size: clamp(1.55rem, 4vw, 2.2rem); line-height: 1; }
.dvm-pseo-results small { color: inherit; }
.dvm-pseo-results .is-accent { background: var(--color-accent); color: #fff; }
.dvm-pseo-results .is-accent span { color: rgba(255, 255, 255, .82); }
.dvm-pseo-results--measurement strong { font-size: clamp(1.15rem, 3vw, 1.55rem); }
.dvm-pseo-status { margin-top: .8rem; font-size: .85rem; }
.dvm-pseo-status.is-error { color: #9b2c2c; font-weight: 700; }

.dvm-pseo-presets { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .75rem; }
.dvm-pseo-presets button {
  padding: .55rem .8rem;
  border: 1px solid var(--color-line);
  background: var(--color-ivory);
  color: var(--color-ink);
  cursor: pointer;
}
.dvm-pseo-presets button:hover,
.dvm-pseo-presets button.is-active { border-color: var(--color-accent); background: var(--color-accent); color: #fff; }

.dvm-pseo-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-line);
  border-left: 1px solid var(--color-line);
}

.dvm-pseo-template-grid a {
  position: relative;
  display: flex;
  min-height: 135px;
  padding: 1rem 3rem 1rem 1rem;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-ivory);
  text-decoration: none;
}

.dvm-pseo-template-grid a:hover { background: #fff; }
.dvm-pseo-template-grid a > span { color: var(--color-accent); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.dvm-pseo-template-grid strong { margin: .2rem 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }
.dvm-pseo-template-grid small { color: var(--color-muted); line-height: 1.35; }
.dvm-pseo-template-grid b { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }

.dvm-pseo-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.25rem; }
.dvm-pseo-actions > a:not(.button) { font-size: .9rem; font-weight: 700; }

@media (max-width: 720px) {
  .dvm-pseo-panel__header,
  .dvm-pseo-fields,
  .dvm-pseo-fields--compact,
  .dvm-pseo-results,
  .dvm-pseo-template-grid { grid-template-columns: 1fr; }

  .dvm-pseo-results > div { min-height: 96px; border-right: 0; border-bottom: 1px solid var(--color-line); }
  .dvm-pseo-results > div:last-child { border-bottom: 0; }
  .dvm-pseo-template-grid { border-right: 1px solid var(--color-line); }
  .dvm-pseo-template-grid a { border-right: 0; }
  .dvm-pseo-actions { align-items: stretch; flex-direction: column; }
  .dvm-pseo-actions .button { width: 100%; text-align: center; }
}

