@font-face {
  font-family: Plex;
  src: url('/assets/fonts/ibm-plex-sans-latin-var.woff2') format('woff2');
  font-weight: 100 700;
  font-display: swap;
}
:root {
  --paper: #f4f4f1;
  --ink: #14171c;
  --body: #434a54;
  --muted: #525c67;
  --accent: #1e3f66;
  --navy: #152f4d;
  --soft: #e6edf5;
  --rule: #cbd0d2;
  --white: #fff;
  --gutter: clamp(16px, 4vw, 48px);
  font-family: Plex, 'Helvetica Neue', Arial, 'Hiragino Sans', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.5rem);
  max-width: 19ch;
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
p {
  max-width: 62ch;
  color: var(--body);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button,
a,
select,
input,
textarea,
summary {
  touch-action: manipulation;
}
button,
select,
input,
textarea,
summary {
  min-height: 44px;
}
button,
select {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #3d668e;
  outline-offset: 3px;
}
button,
.secondary,
.primary,
.price-entry {
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 0.63rem 1rem;
  background: white;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
button:hover,
.secondary:hover {
  border-color: var(--accent);
  background: var(--soft);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
.primary,
.price-entry,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.primary:hover,
.price-entry:hover,
button.primary:hover {
  background: var(--navy);
}
.primary,
.secondary,
.price-entry {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.actions,
.moves,
.chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.actions {
  gap: 10px;
}
.mast,
main,
footer {
  max-width: 1190px;
  margin: auto;
  padding-inline: var(--gutter);
}
.mast {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
}
.mast nav,
footer nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand,
footer > a {
  display: flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.brand {
  font-size: 1.4rem;
  letter-spacing: -0.055em;
  font-weight: 600;
}
.mast select {
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 110px;
}
.price-entry {
  padding-inline: 20px;
}
.hero,
.guide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 68px);
}
.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  margin: 1.25rem 0 1.7rem;
  line-height: 1.6;
}
.free {
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.65rem;
}
.price-line {
  font-size: 0.95rem;
  margin-top: 0.3rem;
  max-width: 51ch;
}
.work-sample {
  position: relative;
  display: grid;
  place-items: center;
  padding: 30px 20px 42px;
  background: #e6ebef;
  border: 1px solid #ccd4db;
  border-radius: 14px;
  isolation: isolate;
  overflow: hidden;
  min-height: 460px;
}
.work-sample::before,
.work-sample::after {
  content: '';
  position: absolute;
  z-index: -1;
  background: #fdfdfd;
  border: 1px solid #bbc5ce;
  width: 62%;
  height: 75%;
  right: 3%;
  transform: rotate(10deg);
  box-shadow: 0 2px 5px #14171c12;
}
.work-sample::after {
  transform: rotate(-12deg);
  right: auto;
  left: 5%;
  background: #f4f5f4;
}
.phone-frame {
  width: min(79%, 248px);
  border: 5px solid #242b32;
  border-radius: 25px;
  background: #e6edf3;
  box-shadow: 0 10px 22px #182b3b24;
  padding: 14px 9px 11px;
  transform: rotate(-3deg);
}
.phone-bar,
.phone-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--accent);
  font-size: 0.7rem;
}
.phone-bar {
  font-weight: 600;
  padding: 0 4px 10px;
}
.phone-bar span {
  font-weight: 400;
}
.phone-meter {
  margin: 12px 3px 0;
}
.specimen {
  padding: 20px 14px 24px;
  border: 1px solid #c8cfd4;
  background: white;
  color: #20272d;
  line-height: 1.38;
  min-height: 275px;
}
.specimen > strong {
  font-size: 1.28rem;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.specimen > p,
.specimen li {
  font-size: 0.68rem;
  line-height: 1.38;
}
.specimen b {
  font-size: 0.71rem;
  color: var(--accent);
  border-top: 1px solid var(--rule);
  display: block;
  padding-top: 5px;
  margin-top: 12px;
}
.specimen ul {
  margin: 4px 0;
  padding-left: 12px;
}
.work-sample figcaption {
  position: absolute;
  bottom: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.band {
  padding-block: 36px;
  border-top: 1px solid var(--rule);
}
.band h2 {
  margin-bottom: 18px;
}
.path-steps,
.guide-links,
.proof,
.library-grid {
  display: grid;
  gap: 12px;
}
.path-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.path-steps p {
  color: var(--accent);
  font-weight: 500;
}
.proof,
.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.proof {
  margin-top: 24px;
}
.proof > div,
.sample-card,
.panel,
.price-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: clamp(16px, 3vw, 28px);
  min-width: 0;
}
.proof p,
.sample-card p,
.price-card p {
  margin: 12px 0;
}
.proof .secondary {
  font-size: 0.9rem;
}
.guide-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 22px;
}
.guide-links a,
.backlink,
.narrow > a,
footer a,
.legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.guide-links a {
  justify-content: space-between;
  gap: 8px;
  padding-block: 8px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.guide-links a:hover {
  text-decoration: underline;
}
.narrow {
  max-width: 760px;
  margin: auto;
  padding-block: clamp(32px, 6vw, 72px);
}
.narrow h1 {
  margin-bottom: 24px;
}
.legal p {
  margin-block: 18px;
}
.price-card {
  border-top: 4px solid var(--accent);
  box-shadow: 0 2px 10px #14171c0c;
}
.price-card .price-line {
  font-size: 1.45rem;
  color: var(--ink);
}
.sample-card {
  border-top: 3px solid var(--accent);
}
.sample-card .sample-role {
  font-size: 1.35rem;
  color: var(--ink);
}
.sample-card li {
  margin: 0.65rem 0;
}
.faq details,
.patterns {
  border-top: 1px solid var(--rule);
  padding: 5px 0;
}
.faq summary,
.patterns summary {
  cursor: pointer;
  align-content: center;
  font-weight: 500;
  padding: 9px 2px;
}
.faq details p,
.patterns p {
  padding: 2px 0 15px;
}
.guide {
  align-items: start;
}
.guide h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.7rem);
}
.backlink {
  font-size: 0.9rem;
}
footer {
  margin-top: 24px;
  min-height: 80px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}
footer nav {
  gap: 16px;
}
footer a {
  font-size: 0.9rem;
}
.workspace {
  padding-block: 22px;
}
.workspace h1,
.library h1 {
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  overflow-wrap: anywhere;
}
.library h1 {
  margin: 0 0 20px;
}
.library .field {
  margin: 16px 0 10px;
}
.library .panel > .actions {
  margin-top: 16px;
}
.saved-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.saved-row button:first-child {
  flex: 1;
  text-align: left;
}
.workspace-top,
.section-head,
.canvas-title,
.save-tools,
.sticky-tools,
.editor-tabs,
.copy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.workspace-top > div,
.section-head > h3 {
  min-width: 0;
}
.save-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.save-tools span,
.sample-note,
.edited,
.canvas-title span,
.copy-item small {
  font-size: 0.85rem;
  color: var(--muted);
}
.save-tools button,
.moves button {
  min-width: 44px;
  padding: 8px;
}
.sample-note {
  margin: 12px 0;
}
.link-button {
  border: 0;
  background: transparent;
  padding-left: 0;
}
.sticky-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 5px 0;
  margin-top: 12px;
}
.sticky-tools strong,
.canvas-title span {
  font-variant-numeric: tabular-nums;
}
.editor-tabs {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 3px;
  padding: 10px 0;
}
.editor-tabs button {
  border-color: transparent;
  background: transparent;
}
.editor-tabs button[aria-current='page'] {
  color: var(--navy);
  background: var(--soft);
  border-color: #abbccf;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
}
.workspace-grid.preview-open {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}
.workspace > .actions,
#work > .actions {
  margin-top: 18px;
}
.canvas {
  position: sticky;
  top: 62px;
  background: #e4e8ea;
  padding: clamp(10px, 2vw, 20px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  max-height: calc(100dvh - 76px);
  overflow: auto;
  min-width: 0;
}
.canvas-title {
  margin-bottom: 10px;
}
.sheet {
  font-family: Sheet, 'Sheet CJK', sans-serif;
  font-kerning: none;
  font-variant-ligatures: none;
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 2px 6px #2222;
}
.sheet + .sheet {
  margin-top: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-weight: 500;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.field > span:empty {
  display: none;
}
input,
textarea,
.field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  background: white;
  border: 1px solid #929da7;
  border-radius: 6px;
  font-weight: 400;
}
textarea {
  resize: vertical;
}
.field small {
  display: inline;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.check input {
  min-height: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.step-bar .field {
  margin-top: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.editor-panel h2 {
  font-size: 1.6rem;
  margin: 10px 0 16px;
}
.entry,
.order-item,
.bullet-edit,
.patterns,
.foot-actions {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  margin-top: 18px;
}
.entry:last-of-type {
  margin-bottom: 12px;
}
.section-head {
  flex-wrap: wrap;
}
.paired {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.moves {
  justify-content: flex-end;
}
.bullet-edit {
  border: 0;
  border-left: 2px solid var(--rule);
  padding: 0 0 0 10px;
}
.field mark,
.phrase-list mark {
  color: #19365a;
  background: #dce9f7;
  font-weight: 600;
}
.foot-actions {
  justify-content: flex-end;
}
.chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--accent);
  font-size: 0.9rem;
}
.notice,
.flag,
.success {
  padding: 12px 15px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  color: var(--navy);
  margin-block: 10px;
  overflow-wrap: anywhere;
}
.portal-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  padding: 16px;
  border: 1px solid var(--rule);
  background: #fafaf8;
}
.copy-item {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  align-items: flex-start;
}
.copy-item span,
.entry h3 {
  overflow-wrap: anywhere;
}
.copy-item small {
  display: block;
}
.copy-item button {
  flex-shrink: 0;
}
.file-actions,
.phrase-list {
  display: grid;
  gap: 8px;
  margin-block: 16px;
}
.file-actions button {
  text-align: start;
}
.phrase-list button {
  text-align: start;
}
.phrase-list {
  max-height: 50dvh;
  overflow: auto;
}
dialog {
  padding: clamp(20px, 3vw, 32px);
  width: min(550px, calc(100% - 24px));
  max-height: 88dvh;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
}
dialog::backdrop {
  background: #15202f82;
}
dialog h2,
dialog p,
dialog .actions {
  margin-bottom: 14px;
}
dialog > button {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .hero,
  .guide {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 24px;
  }
  .hero h1 {
    max-width: 17ch;
  }
  .work-sample {
    min-height: 0;
    padding-block: 20px 32px;
  }
  .phone-frame {
    width: min(80%, 230px);
  }
  .path-steps,
  .guide-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace-grid {
    gap: 8px;
  }
  .save-tools span {
    max-width: 21ch;
  }
  .mast {
    min-height: 62px;
  }
  .mast nav {
    gap: 4px;
  }
}
@media (max-width: 600px) {
  .workspace-grid {
    display: block;
  }
  .workspace-grid:not(.preview-open) .canvas {
    display: none;
  }
  .canvas {
    position: static;
    max-height: none;
  }
  .workspace-top {
    align-items: flex-start;
  }
  .workspace-top h1 {
    font-size: 1.65rem;
  }
  .save-tools {
    max-width: 136px;
    gap: 4px;
  }
  .save-tools span {
    flex-basis: 100%;
    text-align: right;
  }
  .library-grid,
  .proof {
    grid-template-columns: 1fr;
  }
  .editor-tabs {
    gap: 0;
  }
  .editor-tabs button {
    font-size: 0.9rem;
    padding: 8px;
  }
  .hero .actions > a {
    flex: 1;
  }
  .price-entry {
    padding-inline: 13px;
  }
  .paired {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .guide-links {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: flex-start;
  }
  .copy-item {
    flex-wrap: wrap;
  }
  footer,
  footer nav {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mast select {
    min-width: 44px;
    max-width: 92px;
  }
  h1,
  h2,
  h3,
  button,
  a,
  label,
  p,
  summary {
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.month-field {
  display: flex;
  gap: 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px;
}
.month-field label {
  flex: 1;
  min-width: 0;
}
.month-field select {
  width: 100%;
}
@media (max-width: 600px) {
  .hero .actions > a {
    padding-inline: 9px;
    gap: 6px;
  }
}
