
html,
body.pto-body {
  max-width: 100%;
  overflow-x: clip;
}

body.pto-body {
  overflow-x: hidden;
}

.pto-mode-dropdown-menu,
.pto-share-menu,
.pto-loader,
.pto-output-meta,
.pto-history[hidden] {
  display: none !important;
}

.pto-mode-dropdown-menu.is-open {
  display: grid !important;
}

.pto-share-menu.is-open {
  display: block !important;
}

.pto-loader.is-active,
.pto-output-meta.is-active {
  display: flex !important;
}

.pto-output-meta.is-active {
  display: flex !important;
}

:root {
  --pto-bg: #fdfdfd;
  --pto-card: #ffffff;
  --pto-text: #0f172a;
  --pto-muted: #64748b;
  --pto-soft: #94a3b8;
  --pto-line: #e2e8f0;
  --pto-line-2: #f1f5f9;
  --pto-dark: #0f172a;
  --pto-dark-2: #111827;
  --pto-emerald: #059669;
  --pto-indigo: #818cf8;
  --pto-indigo-soft: rgba(99, 102, 241, 0.18);
  --pto-radius-sm: 2px;
  --pto-radius-md: 6px;
  --pto-radius-lg: 18px;
  --pto-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.03);
  --pto-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
  --pto-shadow-lg: 0 30px 90px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.pto-body {
  margin: 0;
  background: var(--pto-bg);
  color: var(--pto-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.pto-body.admin-bar .pto-site-header {
  top: 32px;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

button {
  cursor: pointer;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pto-shell {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

.pto-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--pto-line);
}

.pto-header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.pto-branding,
.pto-branding-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.pto-brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pto-dark);
  color: #fff;
  border-radius: var(--pto-radius-sm);
  font-size: 1.1rem;
  line-height: 1;
  flex: 0 0 40px;
}

.pto-brand-text,
.pto-footer-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pto-brand-text {
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1;
  white-space: nowrap;
}

.pto-custom-logo img {
  max-height: 54px;
  width: auto;
}

.pto-footer-custom-logo img {
  max-height: 54px;
  width: auto;
}

.pto-top-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.pto-top-nav > * {
  display: flex;
  align-items: center;
}

.pto-nav-link {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pto-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 2px solid transparent;
  line-height: 1;
  vertical-align: middle;
}

.pto-nav-link:hover,
.pto-nav-link.is-active,
.pto-top-nav .current-menu-item > a {
  color: var(--pto-text);
  border-bottom-color: var(--pto-text);
}

.pto-mode-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pto-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pto-chevron {
  font-size: 0.85em;
}

.pto-mode-dropdown-menu,
.pto-share-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  right: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--pto-line);
  box-shadow: var(--pto-shadow-md);
  padding: 0.5rem;
  z-index: 60;
}

.pto-mode-dropdown-menu {
  display: grid;
  gap: 0.15rem;
}

.pto-mode-dropdown-menu button,
.pto-share-menu a,
.pto-copy-link {
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  display: block;
  padding: 0.72rem 0.8rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pto-mode-dropdown-menu button:hover,
.pto-mode-dropdown-menu button.is-active,
.pto-share-menu a:hover,
.pto-copy-link:hover {
  background: #f8fafc;
  color: var(--pto-text);
}

.pto-share-wrap {
  position: relative;
  flex: 0 0 auto;
}

.pto-icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.pto-icon-button:hover {
  background: #f1f5f9;
}

.pto-share-glyph {
  color: var(--pto-muted);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pto-share-glyph svg {
  display: block;
}

.pto-main {
  padding: 3.5rem 0 0;
}

.pto-hero {
  max-width: 980px;
  margin: 0 auto 2rem;
  text-align: center;
}

.pto-hero h1,
.pto-history-head h2,
.pto-cta-content h2,
.pto-seo-content h1,
.pto-seo-content h2,
.pto-seo-content h3,
.pto-site-footer .widget-title {
  font-family: "Playfair Display", Georgia, serif;
}

.pto-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.pto-hero h1 span {
  font-style: italic;
}

.pto-hero-copy {
  max-width: 700px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.75;
  color: var(--pto-muted);
  font-weight: 300;
}

.pto-ad-wrap {
  margin: 0 auto 2rem;
}

.pto-ad-wrap-top {
  margin-top: 2rem;
}

.pto-ad-placeholder {
  min-height: 96px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: #64748b;
}

.pto-ad-placeholder span {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #334155;
  margin-bottom: 0.3rem;
}

.pto-ad-placeholder small {
  font-size: 0.95rem;
}

.pto-mode-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.85rem;
  margin: 0 auto 2rem;
}

.pto-mode-button {
  position: relative;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.05rem 0.7rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pto-mode-button:hover,
.pto-mode-button.is-active {
  color: var(--pto-text);
  border-bottom-color: var(--pto-text);
}

.pto-popular-pill {
  position: absolute;
  top: -0.25rem;
  right: -0.5rem;
  background: var(--pto-dark);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.35rem;
  font-size: 0.44rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pto-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 3.75rem;
}

.pto-card {
  background: var(--pto-card);
  border: 1px solid var(--pto-line);
  box-shadow: var(--pto-shadow-sm);
  overflow: hidden;
}

.pto-tool-card {
  min-height: 570px;
  display: flex;
  flex-direction: column;
}

.pto-card-head,
.pto-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pto-card-head {
  background: #f8fafc;
  border-bottom: 1px solid var(--pto-line);
  padding: 0.95rem 1.5rem;
}

.pto-card-head-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pto-label,
.pto-stats,
.pto-status-line,
.pto-warning {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.pto-label {
  color: #64748b;
}

.pto-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--pto-line);
  background: #fff;
  color: #475569;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pto-upload-button:hover {
  background: #f8fafc;
  color: var(--pto-text);
}

.pto-upload-button input {
  display: none;
}

.pto-stats {
  display: flex;
  gap: 1rem;
  color: var(--pto-soft);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pto-textarea,
.pto-output-body {
  min-height: 370px;
  flex: 1 1 auto;
}

.pto-textarea {
  width: 100%;
  resize: vertical;
  overflow-wrap: anywhere;
  border: 0;
  padding: 1.5rem;
  color: var(--pto-text);
  font-size: 1.08rem;
  line-height: 1.8;
  outline: none;
  background: #fff;
}

.pto-textarea::placeholder {
  color: #cbd5e1;
  font-style: italic;
}

.pto-textarea.is-over-limit {
  background: rgba(254, 242, 242, 0.45);
}

.pto-card-foot {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--pto-line-2);
  background: #fff;
}

.pto-warning {
  color: #dc2626;
}

.pto-primary-button,
.pto-secondary-button,
.pto-clear-button,
.pto-history-actions button,
.pto-cta-button {
  border: 0;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.pto-primary-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--pto-dark);
  color: #fff;
  padding: 0.85rem 1.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.pto-primary-button:hover:not(:disabled),
.pto-secondary-button:hover:not(:disabled),
.pto-history-actions button:hover,
.pto-cta-button:hover {
  transform: translateY(-1px);
}

.pto-primary-button:disabled,
.pto-secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.pto-output-body {
  position: relative;
  background: rgba(248, 250, 252, 0.35);
  padding: 1.5rem;
}

.pto-output-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pto-soft);
  font-weight: 700;
}

.pto-result-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ecfdf5;
  color: var(--pto-emerald);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}

.pto-output-text {
  font-size: 1.08rem;
  line-height: 1.85;
  color: #1e293b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pto-output-text.is-empty {
  color: #cbd5e1;
  font-style: italic;
}

.pto-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1px);
  z-index: 5;
}

.pto-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--pto-dark);
  border-radius: 999px;
  animation: pto-spin 1s linear infinite;
}

@keyframes pto-spin {
  to {
    transform: rotate(360deg);
  }
}

.pto-status-line {
  color: var(--pto-emerald);
}

.pto-secondary-button,
.pto-clear-button {
  background: transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

.pto-clear-button {
  font-size: 1rem;
}

.pto-cta-panel {
  position: relative;
  overflow: hidden;
  background: var(--pto-dark);
  border-radius: var(--pto-radius-lg);
  padding: 2.4rem 2.8rem;
  margin-bottom: 3.75rem;
}

.pto-cta-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
}

.pto-cta-glow-a {
  width: 300px;
  height: 300px;
  background: rgba(99, 102, 241, 0.22);
  top: -120px;
  right: -120px;
}

.pto-cta-glow-b {
  width: 320px;
  height: 320px;
  background: rgba(16, 185, 129, 0.12);
  bottom: -160px;
  left: -140px;
}

.pto-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.pto-cta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--pto-indigo-soft);
  color: #c7d2fe;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pto-cta-content h2 {
  margin: 0 0 0.9rem;
  color: #fff;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1.08;
  font-weight: 600;
}

.pto-cta-content p {
  margin: 0;
  max-width: 620px;
  color: #94a3b8;
  font-size: 1.08rem;
  line-height: 1.8;
}

.pto-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  align-self: center;
  background: #fff;
  color: var(--pto-dark);
  padding: 1rem 1.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.2);
}

.pto-history {
  margin-bottom: 3.75rem;
}

.pto-history-card {
  padding: 2rem;
}

.pto-history-head {
  margin-bottom: 1.6rem;
}

.pto-history-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pto-history-icon {
  font-size: 1.4rem;
}

.pto-history-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  line-height: 1.1;
}

.pto-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.pto-history-item {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--pto-line-2);
  background: rgba(248, 250, 252, 0.58);
}

.pto-history-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--pto-soft);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.pto-history-item blockquote {
  margin: 0 0 1.1rem;
  overflow-wrap: anywhere;
  padding-left: 1rem;
  border-left: 2px solid var(--pto-line);
  color: var(--pto-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  font-style: italic;
}

.pto-history-result {
  color: var(--pto-text);
  font-size: 0.95rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pto-history-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.pto-history-actions button {
  background: #fff;
  border: 1px solid var(--pto-line);
  color: #475569;
  padding: 0.55rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pto-history-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.4rem;
  color: var(--pto-soft);
  font-style: italic;
}

.pto-seo-section {
  max-width: 960px;
  margin: 0 auto 4.5rem;
}

.pto-seo-card {
  padding: 2.9rem;
}

.pto-seo-content {
  color: #334155;
}

.pto-seo-content h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--pto-text);
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.pto-seo-content h3 {
  margin: 2rem 0 0.8rem;
  color: var(--pto-text);
  font-size: 1.2rem;
  line-height: 1.35;
}

.pto-seo-content p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.85;
  color: #475569;
}

.pto-footer-ad-wrap {
  padding-bottom: 0;
}

.pto-site-footer {
  background: var(--pto-dark);
  color: #fff;
  padding: 4rem 0 2rem;
}

.pto-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.pto-footer-logo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pto-footer-title {
  font-size: 2rem;
  line-height: 1.05;
}

.pto-footer-brand p,
.pto-site-footer .widget,
.pto-site-footer .widget li,
.pto-footer-bottom {
  color: #94a3b8;
}

.pto-footer-brand p,
.pto-site-footer .widget li,
.pto-site-footer .widget p {
  line-height: 1.8;
}

.pto-site-footer .widget-title {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #fff;
}

.pto-site-footer .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pto-site-footer .widget li + li {
  margin-top: 0.8rem;
}

.pto-site-footer a:hover {
  color: #fff;
}

.pto-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.pto-footer-bottom p {
  margin: 0;
}

.pto-footer-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.pto-page-content,
.pto-post-list {
  padding: 3rem 0 4rem;
}

.pto-page-content .entry-content,
.pto-post-list article {
  background: #fff;
  border: 1px solid var(--pto-line);
  padding: 2rem;
}

@media (max-width: 1100px) {
  .pto-tool-grid,
  .pto-history-grid,
  .pto-footer-grid {
    grid-template-columns: 1fr;
  }

  .pto-cta-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .pto-top-nav {
    display: none;
  }

  .pto-header-inner {
    min-height: 72px;
  }

  .pto-main {
    padding-top: 2.5rem;
  }

  .pto-card-head,
  .pto-card-foot,
  .pto-output-body,
  .pto-textarea,
  .pto-seo-card,
  .pto-history-card,
  .pto-cta-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pto-card-head,
  .pto-card-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .pto-stats {
    justify-content: flex-start;
  }

  .pto-footer-bottom,
  .pto-footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .pto-shell {
    width: min(100% - 1rem, 1280px);
  }

  .pto-brand-text {
    font-size: 1.2rem;
  }

  .pto-hero h1 {
    font-size: 2.4rem;
  }

  .pto-mode-strip {
    justify-content: flex-start;
  }

  .pto-mode-button {
    font-size: 0.86rem;
  }

  .pto-tool-card {
    min-height: auto;
  }

  .pto-textarea,
  .pto-output-body {
    min-height: 280px;
  }
}
