:root {
  color-scheme: light;
  --publisher-bg: #f7f8fa;
  --publisher-ink: #242a35;
  --publisher-muted: #616b78;
  --publisher-border: #dde2e8;
  --publisher-accent: #b84b16;
  --publisher-accent-hover: #943910;
  --publisher-focus: #1f5bc7;
}

.publisher-page {
  margin: 0;
  background: var(--publisher-bg);
  color: var(--publisher-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.publisher-page *, .publisher-page *::before, .publisher-page *::after { box-sizing: border-box; }
.publisher-page a { color: var(--publisher-accent); text-underline-offset: 3px; }
.publisher-page a:hover { color: var(--publisher-accent-hover); }
.publisher-page :focus-visible { outline: 3px solid var(--publisher-focus); outline-offset: 4px; }
.publisher-page img { display: block; max-width: 100%; }
.publisher-page button, .publisher-page select, .publisher-page input, .publisher-page textarea { font: inherit; }
.publisher-page button, .publisher-page select { min-height: 44px; }
.publisher-page button { cursor: pointer; }
.publisher-page button:disabled, .publisher-page select:disabled { cursor: wait; opacity: .6; }
.publisher-page h1, .publisher-page h2, .publisher-page h3 { margin: 0; color: var(--publisher-ink); line-height: 1.35; overflow-wrap: anywhere; }
.publisher-page h2 { font-size: 1.4rem; letter-spacing: -.02em; }
.publisher-page h3 { font-size: 1.06rem; }
.publisher-page p { margin: 0 0 1em; }
.publisher-page p:last-child { margin-bottom: 0; }
.publisher-page ul, .publisher-page ol { padding-inline-start: 1.4rem; }
.publisher-page li + li { margin-top: .4rem; }
.publisher-page pre { overflow: auto; padding: 18px; background: #f2f4f7; border-radius: 8px; max-width: 100%; }
.publisher-page code { font-size: .9em; overflow-wrap: anywhere; }

.publisher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  width: 100%;
  min-height: 88px;
  padding: 20px max(24px, calc((100% - 1160px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--publisher-border);
}
.publisher-header .logo-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--publisher-ink);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.3;
  text-decoration: none;
}
.logo-brand img { width: 34px; height: 34px; flex: 0 0 34px; }
.logo-brand span { min-width: 0; overflow-wrap: anywhere; }
.publisher-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 24px; min-width: 0; font-size: .91rem; }
.publisher-nav a { color: #485363; text-decoration: none; padding-block: 5px; }
.publisher-nav a:hover, .publisher-nav a[aria-current="page"] { color: var(--publisher-accent); }

.publisher-main { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 72px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 5px 9px; margin: 0 0 28px; color: var(--publisher-muted); font-size: .83rem; overflow-wrap: anywhere; }
.breadcrumbs a { color: var(--publisher-muted); }
.publisher-hero { max-width: 870px; padding: 8px 0 34px; }
.eyebrow { margin-bottom: 10px !important; color: var(--publisher-accent); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.publisher-hero h1 { font-size: clamp(1.85rem, 3.5vw, 2.7rem); letter-spacing: -.035em; }
.publisher-hero .lead { margin-top: 16px; max-width: 760px; color: #566171; font-size: 1.06rem; line-height: 1.8; }
.publisher-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 28px; }
.publisher-article, .publisher-sidebar { min-width: 0; }
.publisher-article { display: grid; gap: 24px; }
.publisher-section, .contact-card {
  padding: 28px;
  min-width: 0;
  border: 1px solid var(--publisher-border);
  border-radius: 12px;
  background: #fff;
  overflow-wrap: anywhere;
}
.publisher-section > h2, .publisher-section > h3, .contact-card > h2, .contact-card > h3 { margin-bottom: 16px; }
.publisher-section > p, .publisher-section > ul, .publisher-section > ol { color: #4c5665; }
.publisher-sidebar { display: grid; gap: 20px; }
.publisher-sidebar .publisher-section, .publisher-sidebar .contact-card { padding: 22px; }
.publisher-sidebar h2 { font-size: 1.05rem; }
.publisher-sidebar p, .publisher-sidebar li { font-size: .9rem; }
.publisher-sidebar ul { margin: 0; }
.publisher-sidebar li + li { margin-top: .7rem; }
.publisher-sidebar a { overflow-wrap: anywhere; }
.notice { padding: 16px 18px; margin: 20px 0; border: 1px solid #eddac7; border-inline-start: 3px solid #c6652c; border-radius: 8px; background: #fff9f3; color: #704b31; font-size: .9rem; line-height: 1.75; }
.notice:first-child { margin-top: 0; }
.notice:last-child { margin-bottom: 0; }
.meta { color: var(--publisher-muted); font-size: .81rem; }
.inline-link { font-weight: 600; }
.contact-card a { overflow-wrap: anywhere; }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.guide-card { display: block; padding: 24px; border: 1px solid var(--publisher-border); border-radius: 10px; background: #fff; min-width: 0; overflow-wrap: anywhere; }
a.guide-card { color: var(--publisher-ink); text-decoration: none; }
a.guide-card:hover { border-color: #d6af96; color: var(--publisher-ink); }
.guide-card h2, .guide-card h3 { margin-bottom: 10px; font-size: 1.12rem; }
.guide-card p { color: #5a6574; font-size: .93rem; }

.tool-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 20px 0 8px; }
.tool-controls label { display: flex; flex-direction: column; gap: 5px; color: #546070; font-size: .83rem; font-weight: 600; }
.tool-controls select { width: 94px; padding: 8px 28px 8px 12px; border: 1px solid #cbd2dc; border-radius: 7px; background: #fff; color: var(--publisher-ink); }
.tool-controls button, .publisher-page .button-primary { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 15px; border: 1px solid #cbd2dc; border-radius: 7px; background: #fff; color: #364152; font-size: .88rem; font-weight: 600; line-height: 1.4; text-decoration: none; }
.tool-controls button:hover:not(:disabled) { background: #f5f6f8; border-color: #aeb8c6; }
.publisher-page .button-primary, .tool-controls button[data-action="generate"] { background: var(--publisher-accent); color: #fff; border-color: var(--publisher-accent); }
.publisher-page .button-primary:hover, .tool-controls button[data-action="generate"]:hover:not(:disabled) { background: var(--publisher-accent-hover); border-color: var(--publisher-accent-hover); color: #fff; }
[data-tool-status] { min-height: 32px; padding: 5px 0; margin-bottom: 12px; color: #466450; font-size: .86rem; line-height: 1.6; overflow-wrap: anywhere; }
[data-tool-status][data-state="error"] { color: #ad332e; }
.tool-results { display: grid; gap: 14px; }
.sample-card { min-width: 0; padding: 22px; border: 1px solid #dce2e9; border-radius: 9px; background: #fcfdff; }
.sample-card h3 { margin: 0 0 4px; font-size: 1.03rem; }
.sample-card > .meta { margin-bottom: 17px; }
.sample-fields, .sample-fields dl { margin: 0; }
.sample-fields > div, .sample-fields dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid #e8ecf1; }
.sample-fields dt { color: #697482; font-size: .83rem; }
.sample-fields dd { margin: 0; min-width: 0; color: #303b4b; font-size: .9rem; overflow-wrap: anywhere; }

.publisher-footer { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 36px; border-top: 1px solid var(--publisher-border); color: var(--publisher-muted); font-size: .83rem; overflow-wrap: anywhere; }
.publisher-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.publisher-footer a { color: #546070; }
.publisher-footer p { max-width: 880px; }

@media (max-width: 900px) {
  .publisher-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .publisher-nav { justify-content: flex-start; gap: 6px 22px; }
  .publisher-layout { grid-template-columns: minmax(0, 1fr); }
  .publisher-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .publisher-header { min-height: auto; padding: 18px 20px; }
  .publisher-header .logo-brand { font-size: 1rem; gap: 9px; }
  .logo-brand img { width: 30px; height: 30px; flex-basis: 30px; }
  .publisher-nav { gap: 5px 18px; font-size: .85rem; }
  .publisher-main { width: calc(100% - 32px); padding: 24px 0 46px; }
  .breadcrumbs { margin-bottom: 21px; font-size: .77rem; }
  .publisher-hero { padding-bottom: 26px; }
  .publisher-hero h1 { font-size: 1.85rem; }
  .publisher-hero .lead { font-size: .97rem; }
  .publisher-layout, .publisher-article { gap: 18px; }
  .publisher-section, .contact-card { padding: 20px; border-radius: 9px; }
  .publisher-page h2 { font-size: 1.23rem; }
  .publisher-sidebar, .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-card { padding: 20px; }
  .tool-controls { gap: 8px; }
  .tool-controls button { flex: 1 1 auto; padding-inline: 12px; font-size: .82rem; }
  .tool-controls label { flex: 0 0 78px; }
  .tool-controls select { width: 100%; }
  .sample-card { padding: 17px; }
  .sample-fields > div, .sample-fields dl > div { grid-template-columns: 66px minmax(0, 1fr); gap: 9px; }
  .sample-fields dd { font-size: .85rem; }
  .notice { padding: 13px 15px; font-size: .85rem; }
  .publisher-footer { width: calc(100% - 40px); padding-top: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .publisher-page *, .publisher-page *::before, .publisher-page *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
