:root {
    --tc-ink: #0d1f2d;
    --tc-charcoal: #142936;
    --tc-accent: #ef6a32;
    --tc-teal: #137b80;
    --tc-blue: #1f5f87;
    --tc-background: #eef3f3;
    --tc-muted: #dde7e9;
    --tc-border: #c9d7db;
    --tc-white: #fff;
    --tc-shadow: 0 12px 32px rgba(13, 31, 45, .08);
}

* { box-sizing: border-box; }

body.towel-configurator-page {
    margin: 0;
    background: var(--tc-background);
    color: var(--tc-charcoal);
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.tc-skip-link {
    position: absolute;
    z-index: 2000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    transform: translateY(-160%);
    background: var(--tc-white);
    color: var(--tc-ink);
    border: 2px solid var(--tc-accent);
}

.tc-skip-link:focus { transform: translateY(0); }

.tc-main { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 72px; }
.tc-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #4a616d; font-size: 14px; margin: 6px 0 22px; }
.tc-breadcrumb a, .tc-back-link a { color: var(--tc-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tc-breadcrumb a:hover, .tc-back-link a:hover, .tc-catalog-note a:hover { color: var(--tc-accent); }

.tc-intro {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 56px);
    margin-bottom: 24px;
    color: var(--tc-white);
    background: var(--tc-ink);
    border-top: 4px solid var(--tc-accent);
}

.tc-eyebrow { margin: 0 0 8px; color: var(--tc-accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.tc-intro h1 { max-width: 780px; margin: 0; font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: clamp(32px, 5vw, 54px); font-weight: 650; line-height: 1.12; }
.tc-intro h1 span { color: #bed9dd; }
.tc-intro > p:not(.tc-eyebrow) { max-width: 680px; margin: 16px 0 0; color: #e0ebed; font-size: 18px; }

.tc-local-notice { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; width: fit-content; margin-top: 20px; padding: 9px 12px; color: #fff; background: #214b53; border-left: 3px solid var(--tc-accent); font-size: 14px; }
.tc-local-notice[hidden] { display: none; }
.tc-local-notice strong { color: #ffd5c4; }

.tc-layout { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(300px, .84fr); gap: 24px; align-items: start; }
.tc-form { min-width: 0; background: var(--tc-white); border: 1px solid var(--tc-border); box-shadow: var(--tc-shadow); }
.tc-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.tc-step { padding: 26px clamp(20px, 3vw, 32px) 30px; border-bottom: 1px solid var(--tc-border); }
.tc-step:last-child { border-bottom: 0; }
.tc-step-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.tc-step-heading > span { flex: 0 0 auto; display: grid; width: 36px; height: 36px; place-items: center; color: var(--tc-white); background: var(--tc-ink); border-radius: 2px; font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 13px; font-weight: 700; }
.tc-step-heading h2 { margin: 0; color: var(--tc-ink); font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 21px; font-weight: 600; line-height: 1.25; }
.tc-step-heading p { margin: 5px 0 0; color: #536b76; font-size: 14px; line-height: 1.45; }
.tc-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.tc-choice-grid { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.tc-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-product-card { min-height: 82px; }
.tc-shape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-choice-card, .tc-check-card { position: relative; display: flex; min-width: 0; min-height: 68px; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--tc-border); background: #fff; cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease; }
.tc-choice-card:hover, .tc-check-card:hover { border-color: var(--tc-blue); }
.tc-choice-card:has(input:checked), .tc-check-card:has(input:checked) { border-color: var(--tc-teal); background: #f2f8f8; box-shadow: inset 0 0 0 1px var(--tc-teal); }
.tc-choice-card:focus-within, .tc-check-card:focus-within { outline: 3px solid rgba(239, 106, 50, .55); outline-offset: 2px; }
.tc-choice-card input, .tc-check-card input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--tc-teal); }
.tc-choice-copy { display: grid; gap: 2px; min-width: 0; }
.tc-choice-copy strong, .tc-check-card strong { color: var(--tc-ink); font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.3; }
.tc-choice-copy small, .tc-check-card small { color: #4a616d; font-size: 13px; line-height: 1.4; }
.tc-choice-copy em { margin-top: 3px; color: #647983; font-size: 11px; font-style: normal; line-height: 1.35; }
.tc-shape-card { min-height: 78px; }
.tc-shape-icon { position: relative; flex: 0 0 auto; display: block; width: 46px; height: 46px; background: #e9f1f2; border: 1px solid #b9ced2; }
.tc-shape-rectangle { width: 36px; height: 46px; margin: 0 5px; }
.tc-shape-square { width: 42px; height: 42px; margin: 2px; }
.tc-shape-round { width: 44px; height: 44px; margin: 1px; border-radius: 50%; }
.tc-shape-custom { width: 44px; height: 44px; margin: 1px; clip-path: polygon(20% 0, 82% 5%, 100% 43%, 76% 100%, 18% 87%, 0 30%); }
.tc-shape-custom span { position: absolute; inset: 10px; border: 1px dashed #5d7a85; clip-path: polygon(20% 0, 82% 5%, 100% 43%, 76% 100%, 18% 87%, 0 30%); }

.tc-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tc-field { min-width: 0; }
.tc-field label { display: block; margin: 0 0 7px; color: var(--tc-ink); font-size: 14px; font-weight: 700; }
.tc-field-label { display: block; margin: 0 0 7px; color: var(--tc-ink); font-size: 14px; font-weight: 700; }
.tc-field label span { color: #647983; font-weight: 400; }
.tc-required { color: #b42318 !important; font-weight: 800 !important; }
.tc-field input:not([type="checkbox"]):not([type="radio"]), .tc-field select, .tc-field textarea { display: block; width: 100%; min-height: 48px; padding: 11px 12px; color: var(--tc-ink); background: var(--tc-white); border: 1px solid #9fb3ba; border-radius: 2px; font: inherit; font-size: 16px; }
.tc-field textarea { min-height: 90px; resize: vertical; }
.tc-field input::placeholder, .tc-field textarea::placeholder { color: #6c8088; opacity: 1; }
.tc-field input:focus, .tc-field select:focus, .tc-field textarea:focus { outline: 3px solid rgba(239, 106, 50, .35); border-color: var(--tc-accent); }
.tc-help { display: block; margin-top: 6px; color: #586e78; font-size: 12px; line-height: 1.45; }
.tc-custom-size-field[hidden], .tc-shape-notes-field[hidden] { display: none; }
.tc-custom-size-field { margin-top: 14px; }
.tc-dimensions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tc-dimensions input, .tc-dimensions select { min-width: 0; min-height: 48px; padding: 10px; border: 1px solid #9fb3ba; border-radius: 2px; background: #fff; color: var(--tc-ink); font: inherit; font-size: 16px; }
.tc-dimensions input:focus, .tc-dimensions select:focus { outline: 3px solid rgba(239, 106, 50, .35); border-color: var(--tc-accent); }
.tc-dimensions [hidden] { display: none; }
.tc-shape-notes-field { margin-top: 14px; }

.tc-material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-material-card { align-items: flex-start; min-height: 110px; }
.tc-material-card[hidden] { display: none; }
.tc-material-card input { margin-top: 2px; }
.tc-material-extra { border-style: dashed; background: #f7f9f9; }
.tc-material-other-field, .tc-artwork-notes-field, .tc-details-field { margin-top: 16px; }

.tc-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-check-card { min-height: 74px; align-items: flex-start; }
.tc-check-card input { margin-top: 2px; }
.tc-check-card > span { display: grid; gap: 3px; }
.tc-process-note { margin: 13px 0 0; padding: 10px 12px; color: #314b58; background: #edf4f4; border-left: 3px solid var(--tc-teal); font-size: 13px; line-height: 1.5; }
.tc-color-fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.tc-color-fieldset legend { margin-bottom: 8px; color: var(--tc-ink); font-size: 14px; font-weight: 700; }
.tc-color-fieldset legend span { color: #647983; font-weight: 400; }
.tc-color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-color-choice { position: relative; display: inline-flex; min-height: 44px; gap: 7px; align-items: center; padding: 5px 9px; color: #314b58; border: 1px solid var(--tc-border); font-size: 13px; cursor: pointer; }
.tc-color-choice:has(input:checked) { border-color: var(--tc-teal); background: #f2f8f8; box-shadow: inset 0 0 0 1px var(--tc-teal); }
.tc-color-choice:focus-within { outline: 3px solid rgba(239, 106, 50, .45); outline-offset: 2px; }
.tc-color-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--tc-teal); }
.tc-color-swatch { width: 19px; height: 19px; border: 1px solid #718790; border-radius: 50%; }
.tc-swatch-blue { background: #5eabb5; }
.tc-swatch-white { background: #f4f1e7; }
.tc-swatch-navy { background: #31536c; }
.tc-swatch-custom { background: #ef6a32; }
.tc-custom-color-field { margin-top: 12px; }
.tc-custom-color-field[hidden] { display: none; }
.tc-custom-color-controls { display: flex; gap: 10px; align-items: center; }
.tc-field .tc-custom-color-controls input[type="color"] { display: block; flex: 0 0 68px; width: 68px; min-height: 48px; height: 48px; padding: 4px; background: #fff; border: 1px solid #9fb3ba; border-radius: 2px; cursor: pointer; }
.tc-custom-color-controls input[type="text"] { flex: 1 1 auto; width: 150px; min-width: 120px; min-height: 48px; padding: 10px 12px; color: var(--tc-ink); background: #fff; border: 1px solid #9fb3ba; border-radius: 2px; font: inherit; font-size: 16px; text-transform: uppercase; }
.tc-custom-color-controls input:focus { outline: 3px solid rgba(239, 106, 50, .35); border-color: var(--tc-accent); }
.tc-edge-fieldset { margin: 20px 0 0; padding: 0; border: 0; }
.tc-edge-fieldset legend { margin-bottom: 8px; color: var(--tc-ink); font-size: 14px; font-weight: 700; }
.tc-edge-fieldset legend span { color: #647983; font-weight: 400; }
.tc-edge-color-fieldset { margin-top: 16px; }
.tc-edge-color-swatch { display: inline-block; flex: 0 0 24px; width: 24px; height: 18px; border: 4px solid #5eabb5; background: #fff; }
.tc-edge-swatch-match { background: #5eabb5; }
.tc-edge-swatch-white { border-color: #d6d0c3; background: #f4f1e7; }
.tc-edge-swatch-navy { border-color: #31536c; background: #31536c; }
.tc-edge-swatch-custom { border-color: #ef6a32; background: #ef6a32; }
.tc-edge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-edge-card { min-height: 72px; }
.tc-edge-note { margin: 10px 0 0; padding: 10px 12px; color: #314b58; background: #fff7f2; border-left: 3px solid var(--tc-accent); font-size: 13px; line-height: 1.5; }

.tc-upload { display: flex; position: relative; min-height: 86px; gap: 14px; align-items: center; padding: 14px; border: 1px dashed #6d8993; background: #f7faf9; cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease; }
.tc-upload:hover { border-color: var(--tc-teal); background: #f0f7f6; }
.tc-upload:focus-within { outline: 3px solid rgba(239, 106, 50, .4); outline-offset: 2px; }
.tc-upload-icon { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; color: var(--tc-teal); background: #e4f0ef; }
.tc-upload-icon svg { width: 24px; height: 24px; }
.tc-upload > span:nth-child(2) { display: grid; gap: 3px; }
.tc-upload strong { color: var(--tc-ink); font-size: 15px; }
.tc-upload small { color: #536b76; font-size: 13px; line-height: 1.4; }
.tc-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tc-upload-status { min-height: 22px; margin: 7px 0 0; color: #536b76; font-size: 13px; overflow-wrap: anywhere; }

.tc-privacy { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; color: #314b58; font-size: 13px; line-height: 1.5; }
.tc-privacy input { flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tc-teal); }
.tc-privacy a { color: var(--tc-blue); text-underline-offset: 3px; }
.tc-submit { display: flex; width: 100%; min-height: 54px; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; color: #fff; background: var(--tc-accent); border: 0; border-radius: 2px; font: inherit; font-weight: 800; cursor: pointer; transition: background-color 180ms ease, box-shadow 180ms ease; }
.tc-submit:hover { background: #d95520; box-shadow: 0 5px 14px rgba(13, 31, 45, .16); }
.tc-submit:focus-visible, .tc-secondary-button:focus-visible { outline: 3px solid var(--tc-ink); outline-offset: 3px; }
.tc-submit:disabled { opacity: .55; cursor: wait; }
.tc-submit > span:last-child { font-size: 22px; line-height: 1; }
.tc-submit-note { margin: 9px 0 0; color: #586e78; font-size: 12px; }

.tc-preview-column { position: sticky; top: calc(var(--global-nav-height, 76px) + 16px); display: grid; gap: 16px; }
.tc-preview-card, .tc-catalog-note { background: #fff; border: 1px solid var(--tc-border); box-shadow: var(--tc-shadow); }
.tc-preview-card { padding: 22px; }
.tc-preview-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tc-preview-heading h2 { margin: 0; color: var(--tc-ink); font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 21px; font-weight: 600; line-height: 1.25; }
.tc-preview-tag { padding: 4px 8px; color: #285a61; background: #e6f0f0; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tc-preview-stage { margin-top: 18px; padding: 14px; background: #f0f5f5; border: 1px solid #d6e2e4; }
.tc-stage-meta { display: flex; justify-content: space-between; gap: 8px; color: #49616c; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.tc-towel { position: relative; display: grid; width: min(var(--tc-preview-width, 220px), 100%); aspect-ratio: var(--tc-preview-ratio, .5); margin: 18px auto 10px; overflow: hidden; background: #76bec5; border: 7px solid #fff; box-shadow: 0 8px 18px rgba(13, 31, 45, .16); transition: border-radius 180ms ease, background-color 180ms ease; }
.tc-towel-rectangle { border-radius: 3px; }
.tc-towel-square { aspect-ratio: var(--tc-preview-ratio, 1); border-radius: 3px; }
.tc-towel-round { aspect-ratio: var(--tc-preview-ratio, 1); border-radius: 50%; }
.tc-towel-custom { aspect-ratio: var(--tc-preview-ratio, 1.33); clip-path: polygon(7% 4%, 95% 0, 100% 86%, 77% 100%, 4% 93%, 0 18%); }
.tc-towel-art-default { position: absolute; inset: 0; overflow: hidden; background-color: #5eabb5; }
.tc-wave { position: absolute; left: -12%; width: 125%; height: 29%; border: 1px solid rgba(255, 255, 255, .48); border-radius: 50%; transform: rotate(-9deg); }
.tc-wave-one { top: 15%; }
.tc-wave-two { top: 25%; left: -8%; transform: rotate(7deg); }
.tc-art-mark { position: absolute; top: 50%; left: 50%; display: grid; width: 108px; height: 108px; place-content: center; color: rgba(255, 255, 255, .88); border: 1px solid rgba(255, 255, 255, .65); border-radius: 50%; font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1.4; text-align: center; transform: translate(-50%, -50%); }
.tc-art-upload-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-art-upload-preview[hidden] { display: none; }
.tc-towel-edge { position: absolute; inset: 8px; border: 1px dashed var(--tc-edge-color, #5eabb5); pointer-events: none; transition: border-color 180ms ease; }
.tc-edge-overlocked { border-style: dashed; }
.tc-edge-hemmed { inset: 5px; border: 3px double var(--tc-edge-color, #5eabb5); }
.tc-edge-bound { inset: 2px; border: 7px solid var(--tc-edge-color, #5eabb5); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); }
.tc-edge-custom { inset: 5px; border: 2px dotted var(--tc-edge-color, #5eabb5); }
.tc-stage-caption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 0; color: #566f79; font-size: 12px; text-align: center; }
.tc-stage-color-swatch { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid #718790; border-radius: 50%; background: #5eabb5; }
.tc-stage-edge-swatch { display: inline-block; flex: 0 0 18px; width: 18px; height: 12px; border: 3px solid #5eabb5; background: #fff; }
.tc-summary-list { display: grid; gap: 0; margin: 16px 0 0; }
.tc-summary-list > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #e1e9eb; }
.tc-summary-list > div:last-child { border-bottom: 0; }
.tc-summary-list dt { color: #536b76; font-size: 13px; font-weight: 700; }
.tc-summary-list dd { margin: 0; color: var(--tc-ink); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.tc-preview-disclaimer { margin: 12px 0 0; padding-top: 12px; color: #536b76; border-top: 1px solid #d8e3e5; font-size: 12px; line-height: 1.5; }
.tc-catalog-note { padding: 18px 20px; border-top: 3px solid var(--tc-teal); }
.tc-catalog-note h3 { margin: 0 0 8px; color: var(--tc-ink); font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 16px; font-weight: 600; }
.tc-catalog-note p { margin: 0; color: #536b76; font-size: 13px; line-height: 1.5; }
.tc-catalog-note a { display: inline-block; margin-top: 12px; color: var(--tc-blue); font-size: 13px; font-weight: 700; text-underline-offset: 3px; }

.tc-local-result { margin-top: 24px; padding: clamp(22px, 4vw, 36px); background: #fff; border: 1px solid var(--tc-border); border-left: 4px solid var(--tc-teal); box-shadow: var(--tc-shadow); scroll-margin-top: 100px; }
.tc-local-result[hidden] { display: none; }
.tc-local-result h2 { margin: 0; color: var(--tc-ink); font-family: Lexend, "Segoe UI", Arial, sans-serif; font-size: 24px; }
.tc-local-result > p:not(.tc-eyebrow) { margin: 8px 0 14px; color: #425b66; }
.tc-local-result pre { max-height: 280px; overflow: auto; padding: 14px; color: #203a46; background: #f0f5f5; border: 1px solid #d2e0e2; font: 14px/1.55 "Segoe UI", Arial, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-secondary-button { min-height: 44px; padding: 9px 14px; color: var(--tc-ink); background: #fff; border: 1px solid var(--tc-ink); font: inherit; font-weight: 700; cursor: pointer; }
.tc-secondary-button:hover { color: #fff; background: var(--tc-ink); }
.tc-back-link { margin: 28px 0 0; font-size: 14px; }
.tc-footer { padding: 24px 20px; color: #dbe5e7; background: var(--tc-ink); border-top: 3px solid var(--tc-accent); font-size: 13px; text-align: center; }

@media (max-width: 900px) {
    .tc-main { width: min(760px, calc(100% - 32px)); }
    .tc-layout { grid-template-columns: minmax(0, 1fr); }
    .tc-preview-column { position: static; grid-row: 1; }
    .tc-preview-card { padding: 18px; }
}

@media (max-width: 560px) {
    .tc-main { width: calc(100% - 24px); padding-top: 10px; }
    .tc-breadcrumb { gap: 6px; margin: 3px 0 14px; font-size: 12px; }
    .tc-intro { padding: 26px 20px; margin-bottom: 14px; }
    .tc-intro h1 { font-size: clamp(30px, 9vw, 40px); }
    .tc-intro > p:not(.tc-eyebrow) { font-size: 16px; }
    .tc-layout { gap: 14px; }
    .tc-step { padding: 22px 16px 24px; }
    .tc-step-heading { gap: 10px; margin-bottom: 16px; }
    .tc-step-heading > span { width: 32px; height: 32px; }
    .tc-step-heading h2 { font-size: 19px; }
    .tc-product-grid, .tc-shape-grid, .tc-material-grid, .tc-process-grid, .tc-edge-grid { grid-template-columns: 1fr; gap: 8px; }
    .tc-choice-card, .tc-check-card { min-height: 62px; padding: 11px; }
    .tc-material-card { min-height: 82px; }
    .tc-field-row { grid-template-columns: 1fr; gap: 13px; }
    .tc-dimensions { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 6px; }
    .tc-dimensions input, .tc-dimensions select { padding: 9px 7px; }
    .tc-preview-heading h2 { font-size: 19px; }
    .tc-preview-stage { padding: 11px; }
    .tc-summary-list > div { grid-template-columns: 72px minmax(0, 1fr); }
    .tc-submit { min-height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
