:root {
  color-scheme: light;
  --ink: #17201f;
  --muted: #66716f;
  --line: #d9ded9;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --field: #f4f5f1;
  --teal: #2c7a72;
  --teal-soft: #dcefeb;
  --amber: #c27a22;
  --amber-soft: #fff0cf;
  --plum: #795b82;
  --plum-soft: #f3edf7;
  --shadow: 0 24px 80px rgba(37, 42, 38, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(23, 32, 31, 0.035) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(23, 32, 31, 0.03) 1px, transparent 1px) 0 0 / 36px 36px,
    #f7f4ee;
  color: var(--ink);
}

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

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 32, 31, 0.1);
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.header-action,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 19px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(44, 122, 114, 0.28);
  border-radius: var(--radius);
  background: var(--teal-soft);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-links {
  gap: 4px;
  justify-self: center;
  padding: 4px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.nav-links a {
  min-width: 76px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.nav-links a:hover {
  background: #ffffff;
  color: var(--ink);
}

.header-action {
  justify-self: end;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 720;
}

.workspace-shell {
  width: min(1440px, calc(100% - 36px));
  margin: 28px auto 34px;
}

.workspace-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin: 0 0 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 7px;
  font-size: 17px;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(44, 122, 114, 0.2);
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: #285752;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.quota-strip {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.quota-strip.is-low {
  border-color: rgba(194, 122, 34, 0.34);
  background: #fff0cf;
  color: #705020;
}

.quota-strip.is-empty {
  border-color: rgba(190, 74, 54, 0.34);
  background: #fff1ef;
  color: #7b392e;
}

.status-strip.is-ai {
  border-color: rgba(44, 122, 114, 0.34);
  background: #dcefeb;
  color: #285752;
}

.status-strip.is-fallback {
  border-color: rgba(194, 122, 34, 0.34);
  background: #fff0cf;
  color: #705020;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(44, 122, 114, 0.14);
}

.status-strip.is-fallback .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(194, 122, 34, 0.16);
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(460px, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.input-panel,
.output-panel {
  min-height: 720px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.input-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.output-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 18px;
}

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

.panel-head p {
  max-width: 540px;
  margin-bottom: 0;
  font-size: 14px;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 236px;
  padding: 4px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: var(--field);
}

.mode-button,
.result-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.mode-button {
  gap: 7px;
  padding: 0 10px;
}

.mode-button.is-active,
.result-tab.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(23, 32, 31, 0.1);
}

.icon,
.mode-button svg,
.primary-action svg {
  width: 18px;
  height: 18px;
}

.mode-button svg,
.primary-action svg,
.icon-button svg,
.format-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 174px;
  padding: 20px;
  border: 1.5px dashed rgba(44, 122, 114, 0.38);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--teal);
  background: #f4fbf9;
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone-art {
  display: block;
  width: min(180px, 70%);
  margin-bottom: 6px;
  color: rgba(44, 122, 114, 0.64);
}

.dropzone-art svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone-title {
  color: var(--ink);
  font-weight: 760;
}

.dropzone-meta {
  margin-top: 4px;
  font-size: 13px;
}

.file-meta {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.url-row button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: var(--teal);
  color: #ffffff;
  font-size: 14px;
  font-weight: 780;
}

.url-row button:hover {
  background: #246760;
}

.sample-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sample-button {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 8px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  text-align: left;
}

.sample-button:hover,
.sample-button.is-selected {
  border-color: rgba(44, 122, 114, 0.5);
  color: var(--ink);
}

.sample-button img {
  width: 74px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--field);
}

.preview-frame {
  display: grid;
  min-height: 212px;
  max-height: 312px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(23, 32, 31, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(23, 32, 31, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(23, 32, 31, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(23, 32, 31, 0.04) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

.preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 312px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.86);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 650;
}

input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 650;
}

input[type="text"]::placeholder {
  color: rgba(102, 113, 111, 0.72);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  margin-top: auto;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 15px;
  font-weight: 780;
}

.primary-action.is-working {
  color: rgba(255, 255, 255, 0.72);
}

.action-row {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.icon-button:hover {
  border-color: rgba(44, 122, 114, 0.5);
  color: var(--teal);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.result-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 18px 0 14px;
  padding: 4px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: var(--field);
}

.result-stage {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: #ffffff;
}

.result-view {
  display: none;
  height: 100%;
  min-height: 456px;
  overflow: auto;
}

.result-view.is-active {
  display: block;
}

.diagram-preview {
  display: grid;
  min-width: 100%;
  min-height: 456px;
  place-items: center;
  padding: 22px;
}

.diagram-preview svg {
  width: min(100%, 860px);
  height: auto;
}

.diagram-fallback,
.empty-state {
  width: min(560px, 100%);
  padding: 18px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--muted);
  line-height: 1.5;
}

pre {
  height: 100%;
  margin: 0;
  padding: 18px;
  overflow: auto;
  background: #18201f;
  color: #eaf3f2;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.code-editor {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 456px;
  resize: none;
  border: 0;
  outline: none;
  padding: 18px;
  background: #18201f;
  color: #eaf3f2;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
}

.recent-panel {
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(23, 32, 31, 0.1);
}

.recent-head h3 {
  margin: 0;
  font-size: 14px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.text-button:hover {
  color: var(--ink);
}

.recent-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.recent-list p {
  margin: 4px;
  font-size: 13px;
}

.recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 8px 9px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.recent-item:hover {
  border-color: rgba(44, 122, 114, 0.45);
}

.recent-item strong,
.recent-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item strong {
  font-size: 13px;
}

.recent-item span {
  color: var(--muted);
  font-size: 12px;
}

.recent-chip {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.table-preview {
  padding: 18px;
}

.table-preview table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

.table-preview th,
.table-preview td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(23, 32, 31, 0.1);
  text-align: left;
}

.table-preview th {
  background: var(--field);
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.quality-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.review-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: var(--paper);
}

.upgrade-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(194, 122, 34, 0.32);
  border-radius: var(--radius);
  background: #fff7e5;
}

.upgrade-panel[hidden] {
  display: none;
}

.upgrade-panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.upgrade-panel p {
  margin: 0;
  font-size: 14px;
}

.upgrade-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
}

.upgrade-actions a,
.upgrade-actions button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 780;
}

.upgrade-actions a,
.upgrade-actions button[data-checkout-plan] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 32, 31, 0.14);
  background: var(--ink);
  color: #ffffff;
}

.upgrade-actions button:not([data-checkout-plan]) {
  border: 1px solid rgba(23, 32, 31, 0.14);
  background: #ffffff;
  color: var(--muted);
}

.review-panel p {
  margin: 0;
  font-size: 14px;
}

.review-panel ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.review-panel li::marker {
  color: var(--amber);
}

.quality-bar > div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: var(--paper);
}

.quality-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.quality-bar strong {
  font-size: 24px;
  letter-spacing: 0;
}

.format-band,
.seo-band,
.pricing-band {
  border-top: 1px solid rgba(23, 32, 31, 0.1);
}

.format-band {
  background: #ffffff;
}

.seo-band {
  background: #f1f6f4;
}

.pricing-band {
  background: #fff7e5;
}

.section-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0;
}

.section-copy {
  max-width: 680px;
  margin-bottom: 22px;
}

.section-copy h2,
.seo-layout h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.format-card {
  min-height: 178px;
  padding: 18px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: var(--paper);
}

.format-card:nth-child(2) {
  background: #fffaf0;
}

.format-card:nth-child(3) {
  background: #fbf8ff;
}

.format-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: var(--teal);
}

.format-card:nth-child(2) .format-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.format-card:nth-child(3) .format-icon {
  background: var(--plum-soft);
  color: var(--plum);
}

.format-icon svg {
  width: 23px;
  height: 23px;
}

.format-card p {
  margin-bottom: 0;
  font-size: 15px;
}

.seo-layout,
.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 32px;
  align-items: start;
}

.link-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.link-list a,
.price-row {
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
  color: var(--ink);
  font-weight: 740;
}

.link-list a:hover {
  border-color: rgba(44, 122, 114, 0.52);
}

.price-table {
  display: grid;
  gap: 10px;
}

.price-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 170px) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
}

.price-row span {
  color: var(--muted);
}

.price-row strong {
  color: var(--ink);
}

.price-row button {
  min-width: 86px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 780;
}

.price-row button[data-checkout-plan="free"] {
  background: #ffffff;
  color: var(--muted);
}

.access-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.access-panel span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
}

.access-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.access-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.access-controls input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(23, 32, 31, 0.15);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.access-controls button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 780;
}

.access-controls button[type="button"] {
  background: #ffffff;
  color: var(--muted);
}

.access-status {
  min-height: 20px;
}

.access-status.is-paid {
  color: var(--teal);
  font-weight: 720;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.footer span:first-child {
  color: var(--ink);
  font-weight: 760;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--ink);
}

.plain-page {
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0 74px;
}

.plain-page h1 {
  margin-bottom: 20px;
  font-size: clamp(36px, 5vw, 58px);
}

.plain-page h2 {
  margin-top: 34px;
}

.plain-page p,
.plain-page li {
  color: var(--muted);
  line-height: 1.68;
}

.plain-page ul {
  padding-left: 22px;
}

.checkout-page {
  width: min(980px, calc(100% - 36px));
}

.checkout-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 34px;
}

.checkout-summary > div,
.payment-method-card,
.checkout-note {
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.checkout-summary > div {
  min-height: 78px;
  padding: 14px 16px;
}

.checkout-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.checkout-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.payment-method-card {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.payment-method-card h3 {
  margin: 0;
  font-size: 19px;
}

.payment-method-card p {
  margin: 0;
  font-size: 14px;
}

.payment-method-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 13px;
  border: 1px solid rgba(23, 32, 31, 0.14);
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 780;
}

.payment-method-action:disabled {
  background: #ffffff;
  color: var(--muted);
  cursor: not-allowed;
}

.checkout-note {
  margin-top: 22px;
  padding: 16px;
}

.checkout-note h2 {
  margin-top: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(340px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(23, 32, 31, 0.16);
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .app-grid,
  .seo-layout,
  .pricing-layout {
    grid-template-columns: 1fr;
  }

  .input-panel,
  .output-panel {
    min-height: auto;
  }

  .result-view,
  .diagram-preview,
  .code-editor {
    min-height: 390px;
  }
}

@media (max-width: 780px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .workspace-shell,
  .section-inner,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .workspace-heading {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  .panel-head {
    display: grid;
  }

  .mode-toggle {
    width: 100%;
    min-width: 0;
  }

  .settings-grid,
  .sample-row,
  .url-row,
  .format-grid,
  .link-list {
    grid-template-columns: 1fr;
  }

  .quality-bar {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .review-panel {
    grid-template-columns: 1fr;
  }

  .checkout-summary,
  .payment-method-grid {
    grid-template-columns: 1fr;
  }

  .upgrade-panel {
    grid-template-columns: 1fr;
  }

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

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

  .price-row button {
    width: 100%;
    margin-top: 6px;
  }

  .access-controls {
    grid-template-columns: 1fr 1fr;
  }

  .access-controls input {
    grid-column: 1 / -1;
  }

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

  .footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 60px;
  }

  .brand {
    font-size: 17px;
  }

  .header-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  h1 {
    font-size: 34px;
  }

  .input-panel,
  .output-panel {
    padding: 12px;
  }

  .dropzone {
    min-height: 150px;
  }

  .sample-button {
    grid-template-columns: 66px 1fr;
  }

  .sample-button img {
    width: 66px;
  }

  .quality-bar {
    gap: 6px;
  }

  .quality-bar > div {
    min-height: 62px;
    padding: 9px;
  }

  .quality-bar strong {
    font-size: 20px;
  }
}
