:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #666b75;
  --line: #d7dbe3;
  --paper: #f6f4ef;
  --panel: #ffffff;
  --red: #c93232;
  --blue: #1e5d9f;
  --green: #2e7d55;
  --yellow: #f6d35f;
  --shadow: 0 18px 45px rgba(23, 23, 23, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.1);
  background: rgba(246, 244, 239, 0.94);
  padding: 13px max(18px, calc((100vw - 1180px) / 2));
  backdrop-filter: blur(16px);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.site-header nav a {
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 8px 10px;
  text-decoration: none;
}

.site-header nav a:hover {
  background: #fff;
  color: var(--ink);
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.template-browser,
.editor {
  min-width: 0;
}

.browser-heading {
  margin-bottom: 16px;
}

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

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.template-tabs {
  display: grid;
  gap: 8px;
}

.template-tab {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.template-tab span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-tab strong {
  font-size: 15px;
}

.template-tab:hover,
.template-tab.is-active {
  border-color: #8c98aa;
  box-shadow: 0 8px 20px rgba(23, 23, 23, 0.08);
}

.editor-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.editor-toolbar h2 {
  margin-bottom: 8px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.04;
}

.editor-toolbar p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.print-button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 16px;
}

.template-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.template-form label {
  display: grid;
  gap: 6px;
  color: #373b43;
  font-size: 13px;
  font-weight: 800;
}

.template-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8ced9;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.sheet {
  display: grid;
  width: min(100%, 820px);
  min-height: 980px;
  align-content: center;
  gap: 18px;
  margin: 0 auto;
  border: 1px solid #c7ccd7;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 52px;
  text-align: center;
}

.sheet-accent {
  justify-self: center;
  border: 4px solid currentColor;
  border-radius: 999px;
  color: var(--red);
  font-weight: 1000;
  padding: 9px 18px;
  text-transform: uppercase;
}

.sheet h3 {
  margin: 0;
  font-size: clamp(54px, 10vw, 124px);
  line-height: 0.92;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.sheet p {
  margin: 0;
  font-size: clamp(25px, 4vw, 48px);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.sheet p + p {
  color: var(--muted);
  font-size: clamp(20px, 3vw, 36px);
}

.sheet[data-style="sale"] {
  border: 14px solid var(--yellow);
}

.sheet[data-style="notice"] .sheet-accent,
.sheet[data-style="sale"] .sheet-accent {
  color: var(--red);
}

.sheet[data-style="calm"] .sheet-accent,
.sheet[data-style="planner"] .sheet-accent {
  color: var(--green);
}

.sheet[data-style="shop"] .sheet-accent,
.sheet[data-style="label"] .sheet-accent,
.sheet[data-style="chart"] .sheet-accent,
.sheet[data-style="worksheet"] .sheet-accent {
  color: var(--blue);
}

.sheet-grid {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  text-align: left;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #d8dde6;
  padding: 10px 0;
  font-size: 22px;
  font-weight: 800;
}

.check-row span {
  width: 26px;
  height: 26px;
  border: 3px solid var(--ink);
  border-radius: 5px;
}

.planner-row,
.worksheet-row,
.mini-label {
  display: grid;
  grid-template-columns: 1fr repeat(3, 1fr);
  gap: 8px;
  border: 2px solid #d8dde6;
  padding: 10px;
}

.worksheet-row {
  grid-template-columns: repeat(5, 1fr);
}

.mini-label {
  grid-template-columns: 36px 1fr 1fr;
  min-height: 74px;
  align-items: center;
}

.section {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 54px 0;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 17px;
}

.category-grid,
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-grid article,
.template-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.category-grid span,
.template-card span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-grid strong,
.template-card h3 {
  display: block;
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.15;
}

.template-card h3 a {
  text-decoration: none;
}

.template-card p {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

  .template-form,
  .category-grid,
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-header nav,
  .editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-header nav a {
    text-align: center;
  }

  .template-tabs,
  .template-form,
  .category-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .sheet {
    min-height: 680px;
    padding: 28px;
  }
}

@media print {
  @page {
    margin: 0.35in;
  }

  body {
    background: #fff;
  }

  .site-header,
  .template-browser,
  .editor-toolbar,
  .template-form,
  .section,
  .site-footer {
    display: none !important;
  }

  .workspace {
    display: block;
    width: auto;
    padding: 0;
  }

  .sheet {
    width: 100%;
    min-height: calc(100vh - 0.7in);
    border-color: #111;
    box-shadow: none;
    break-inside: avoid;
  }
}
