@font-face {
  font-family: Inter;
  src: url("/free-sock-design-tool/inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --muted: #666;
  --navy: #1a1f2e;
  --navy-light: #232b3e;
  --green: #1e6f42;
  --mint: #e8f5ec;
  --paper: #f5f5f7;
  --line: #e5e5e5;
  --white: #fff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #007567;
  outline-offset: 3px;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.site-nav, .footer-inner, .nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-nav { min-height: 4.8rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--navy);
  text-decoration: none;
}
.brand img { flex: 0 0 auto; }
.nav-links { font-weight: 500; font-size: .9375rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }
.nav-quote { color: var(--white); background: var(--navy); padding: 10px 16px; border-radius: 6px; }

.hero-shell {
  color: var(--white);
  background: radial-gradient(ellipse at 20% 90%, #a8d8b915, transparent 64%), var(--navy);
}
.hero {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  align-items: stretch;
  padding-block: clamp(26px, 4vw, 54px);
}
.hero-copy { padding: 26px 24px 32px 0; align-self: center; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 {
  font-size: clamp(2.7rem, 5.5vw, 4.2rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.045em;
}
h1 span { display: block; color: #a8d8b9; }
.lead { font-size: clamp(1rem, 1.5vw, 1.125rem); color: #d2d7e1; max-width: 37ch; margin: 19px 0 24px; }
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 285px;
  isolation: isolate;
  overflow: hidden;
  background: #f5f5f7;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
}
.hero-art img { width: min(90%, 365px); height: auto; filter: drop-shadow(0 10px 10px #1a1f2e26); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 9px 20px;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 6px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--navy-light); }
.hero .button { color: var(--navy); background: var(--white); border-color: var(--white); }
.hero .button:hover { background: var(--mint); }
.button.secondary { background: transparent; color: var(--navy); border-color: #c8cbd2; }
.button.secondary:hover { background: var(--paper); }
.text-button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--green);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 650;
}
.workbench {
  scroll-margin-top: 16px;
  margin-top: clamp(24px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px #0000000f;
  padding: clamp(20px, 4vw, 42px);
}
.stage-head, .panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
  flex-wrap: wrap;
}
.stage-head { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -.025em; }
.steps { display: flex; flex-wrap: wrap; gap: 10px 19px; padding: 0; margin: 0; list-style: none; }
.steps li { color: var(--muted); display: flex; gap: 7px; align-items: center; font-size: .9rem; font-weight: 650; }
.steps span {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.steps [aria-current="step"] { color: var(--green); }
.steps [aria-current="step"] span { color: var(--white); background: var(--green); border-color: var(--green); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
label { display: block; margin-bottom: 7px; font-weight: 700; }
.muted { color: var(--muted); font-size: .875rem; font-weight: 500; margin-inline-start: 5px; }
.file-pick, input[type="text"], select {
  width: 100%;
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper);
}
.file-pick { display: flex; position: relative; align-items: center; padding: 5px; gap: 8px; font-size: .9rem; min-width: 0; }
.file-pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-pick:focus-within { outline: 3px solid #007567; outline-offset: 3px; }
.file-pick span:first-of-type {
  flex: 0 0 auto;
  border-radius: 3px;
  padding: 7px 10px;
  font-weight: 700;
  color: var(--green);
  background: var(--mint);
}
.file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
input[type="text"], select { padding: 9px 11px; }
.toggle { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.toggle button {
  padding: 4px 11px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green);
  font-size: .9rem;
  font-weight: 650;
}
.toggle button[aria-pressed="true"] { background: var(--mint); border-color: #94b5a8; }
.upload-preview {
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 63px;
  margin-top: 9px;
  background-color: #f5f5f5;
  background-image: conic-gradient(#ddd 90deg, transparent 90deg 180deg, #ddd 180deg 270deg, transparent 270deg);
  background-size: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.upload-preview img { max-width: 80px; max-height: 48px; object-fit: contain; }
.help { font-size: .875rem; color: var(--muted); margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.notice, .warnings {
  margin: 0 0 18px;
  padding: 10px 13px;
  background: var(--mint);
  border-inline-start: 3px solid var(--green);
}
.notice.error, .notice.conversion, .warnings { color: #692c16; background: #fff3e3; border-color: #a75928; }
.panel-heading { margin-bottom: 17px; }
.concepts, .example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.concept {
  min-width: 0;
  display: grid;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  overflow: hidden;
}
.concept:hover { border-color: var(--green); background: var(--mint); }
.concept img { width: 100%; padding: 8px; }
.concept span { display: block; padding: 9px 12px; font-weight: 700; border-top: 1px solid var(--line); background: var(--white); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, 1fr); gap: 20px; align-items: start; }
.editor-preview { border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.editor-preview img { width: 100%; padding: 8px; }
.editor-preview .knit-view { width: auto; max-width: 100%; max-height: 460px; margin: auto; }
.preview-modes { margin: 0; padding: 10px; border-bottom: 1px solid var(--line); }
.fit-size { margin: 0; padding: 8px 10px; }
.palette { list-style: none; margin: 0; padding: 10px; border-top: 1px solid var(--line); display: flex; gap: 6px 12px; flex-wrap: wrap; }
.palette li { display: flex; align-items: center; gap: 5px; font-size: .875rem; }
.swatch { width: 18px; height: 18px; border: 1px solid #0004; border-radius: 4px; flex: 0 0 auto; }
.editor-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 13px;
  min-width: 0;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.editor-form legend { padding: 0 5px; font-weight: 700; }
.refinement-wide, .refinement-field:has(.refinement-check) { grid-column: 1 / -1; }
.refinement-field label { font-size: .875rem; margin-bottom: 4px; }
.refinement-field .refinement-check { display: flex; align-items: center; gap: 7px; }
.refinement-field input[type="number"], .refinement-field select {
  width: 100%;
  min-height: 37px;
  padding: 5px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-size: .875rem;
}
.editor-form output { color: var(--muted); font-size: .875rem; font-weight: 500; margin-inline-start: 5px; }
.editor-form input[type="range"] { width: 100%; accent-color: var(--green); margin: 0 0 10px; }
.color-controls { display: flex; gap: 10px; align-items: center; }
.color-controls input { width: 46px; height: 34px; border: 1px solid var(--line); background: var(--white); border-radius: 4px; cursor: pointer; }
.reset { margin-top: 14px; }
.warnings { margin: 16px 0 0; padding-inline-start: 32px; font-size: .9rem; }

.examples { padding-block: 62px 36px; scroll-margin-top: 16px; }
.examples h2 { margin-bottom: 23px; }
.example-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.example-grid figure { margin: 0; min-width: 0; border-top: 1px solid var(--line); }
.example-grid img { width: 100%; height: auto; background: var(--white); padding: 6px; }
.example-grid figcaption { padding-top: 8px; font-weight: 700; }
.sample-caption { margin-top: 16px; color: var(--muted); font-size: .875rem; }
.tool-about { padding-block: 24px 40px; border-top: 1px solid var(--line); }
.tool-about h2 { margin-bottom: 9px; font-size: 1.25rem; letter-spacing: -.02em; }
.tool-about p { max-width: 66ch; color: var(--muted); }
.site-footer { background: var(--navy); color: var(--white); }
.footer-inner { min-height: 70px; flex-wrap: wrap; padding-block: 13px; }
.footer-inner .brand { color: var(--white); }
.footer-inner a:not(.brand) { color: #b0b8c8; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .hero { padding-block: 24px 30px; grid-template-columns: 1fr; }
  .hero-copy { padding-block: 14px 25px; }
  h1 { font-size: clamp(2.5rem, 9vw, 4rem); }
  .hero-art { min-height: auto; }
  .hero-art img { width: min(87%, 290px); }
  .nav-links { font-size: .9rem; gap: 14px; }
  .site-nav { min-height: 57px; }
  .examples { padding-block: 40px 28px; }
  .tool-about { padding-block: 20px 30px; }
  .example-grid, .concepts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-grid { grid-template-columns: 1fr; }
}

@media (min-width: 761px) {
  .editor-preview { position: sticky; top: 18px; }
}

@media (max-width: 500px) {
  .upload-grid { grid-template-columns: 1fr; }
  .upload-grid { gap: 14px; }
  .nav-links a:first-child { display: none; }
  .stage-head { margin-bottom: 17px; padding-bottom: 15px; }
  .steps { gap: 8px 12px; }
  .steps li { gap: 4px; }
  .steps span { min-width: 22px; height: 22px; }
  .concepts, .example-grid { gap: 10px; }
  .concept span { font-size: .9rem; padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
