/* StickRechner — "Atelier": warm cream + thread-red, stitched seams, spool & needle details. */
:root {
  --cream: #faf4e6; --cream-deep: #f0e3c9; --paper: #fffdf8;
  --red: #b23a2e; --red-deep: #8a2a21; --red-soft: #f8e6e0;
  --ink: #3b2f27; --mut: #7c6c5d; --line: #e2d4b6;
  --radius: 12px;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 6px 20px rgba(138,42,33,.10); --lift: 0 14px 34px rgba(138,42,33,.16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--cream); color: var(--ink); line-height: 1.75; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(178,58,46,.05) 1px, transparent 1px); background-size: 26px 26px; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 26px; }
h1, h2, h3 { font-family: var(--serif); color: var(--red-deep); line-height: 1.3; font-weight: 700; }
/* stitched seam divider */
.seam { border: 0; border-top: 3px dashed var(--red); opacity: .45; margin: 0 auto; max-width: 1060px; position: relative; }
.seam.needle::after { content: ""; display: block; width: 34px; height: 34px; margin: -19px auto 0; background: var(--cream); }
header.site { background: var(--red-deep); position: sticky; top: 0; z-index: 50; border-bottom: 3px dashed rgba(250,244,230,.5); }
header.site .bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 0; }
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
.brand .spool { width: 40px; height: 40px; margin-right: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--cream); border-radius: 50%; border: 2px dashed var(--red); }
.brand .spool svg { width: 22px; height: 22px; fill: var(--red-deep); }
.brand em { font-style: normal; color: #f2b8ac; }
nav.main a { color: #f5ddd4; text-decoration: none; margin-left: 22px; font-size: .92rem; font-weight: 600; }
nav.main a:hover { color: #fff; text-decoration: underline wavy var(--red); text-underline-offset: 5px; }
.hero { position: relative; padding: 104px 0 120px; background: url('../images/hero.webp') center/cover; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(58,25,20,.88), rgba(58,25,20,.42)); }
.hero .container { position: relative; z-index: 1; }
.hero .tag { display: inline-block; background: rgba(250,244,230,.14); border: 2px dashed rgba(250,244,230,.7); color: #ffe9df; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 9px 20px; border-radius: var(--radius); margin-bottom: 20px; }
.hero h1 { color: #fff; font-size: 2.9rem; max-width: 680px; margin-bottom: 16px; }
.hero h1 .rd { color: #ffb3a3; }
.hero p.lead { color: #f7e8dc; font-size: 1.12rem; max-width: 640px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-red { display: inline-block; background: var(--red); color: #fff; text-decoration: none; padding: 16px 38px; border-radius: var(--radius); font-weight: 800; box-shadow: 0 10px 26px rgba(138,42,33,.45); transition: transform .15s; border: 2px dashed rgba(255,255,255,.55); outline: 3px solid var(--red); outline-offset: -1px; }
.btn-red:hover { transform: translateY(-3px); }
.btn-ghost { display: inline-block; border: 2px dashed rgba(255,255,255,.7); color: #fff; text-decoration: none; padding: 14px 34px; border-radius: var(--radius); font-weight: 700; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
section.block { padding: 66px 0; }
section.block.tint { background: var(--paper); border-top: 3px dashed var(--line); border-bottom: 3px dashed var(--line); }
section.block.redtint { background: var(--red-soft); }
.sec-pre { color: var(--red); font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.sec-title { font-size: 2.2rem; margin: 10px 0 12px; }
.sec-sub { color: var(--mut); max-width: 720px; margin-bottom: 36px; font-size: 1.02rem; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.tcard { background: var(--paper); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s; display: flex; flex-direction: column; overflow: hidden; border: 2px dashed var(--red); }
.tcard:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--lift); }
.tcard .ph { height: 138px; background-size: cover; background-position: center; border-bottom: 2px dashed var(--red); }
.tcard .tx { padding: 22px 26px 26px; flex: 1; }
.tcard .no { font-size: .72rem; color: var(--red); letter-spacing: .1em; font-weight: 800; text-transform: uppercase; }
.tcard .tx h3 { font-size: 1.3rem; margin: 8px 0 8px; }
.tcard .tx p { font-size: .93rem; color: var(--mut); margin-bottom: 14px; }
.tcard .go { font-weight: 800; color: var(--red-deep); font-size: .92rem; }
.tcard .go span { color: var(--red); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin: 54px 0; }
.split.flip > div:first-child { order: 2; }
.split .frame { border: 2px dashed var(--red); border-radius: var(--radius); padding: 10px; background: var(--paper); box-shadow: var(--shadow); }
.split .frame img { width: 100%; border-radius: 6px; display: block; }
.split h3 { font-size: 1.65rem; margin-bottom: 12px; }
.split p { color: var(--mut); margin-bottom: 12px; }
.split .more { font-weight: 800; color: var(--red); text-decoration: none; border-bottom: 2px dashed var(--red); }
table.ref { width: 100%; border-collapse: collapse; margin: 14px 0 26px; font-size: .93rem; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 2px dashed var(--line); }
table.ref th { background: var(--red-deep); color: #fff; padding: 13px 15px; text-align: left; font-family: var(--serif); font-size: .95rem; }
table.ref td { padding: 11px 15px; border-bottom: 1px dashed var(--line); }
table.ref tr:last-child td { border-bottom: none; }
table.ref tr:nth-child(even) td { background: #faf3e2; }
.crumbs { font-size: .85rem; color: var(--mut); margin: 24px 0 10px; }
.crumbs a { color: var(--red); text-decoration: none; font-weight: 700; }
.pagehead { max-width: 800px; }
.pagehead h1 { font-size: 2.4rem; margin-bottom: 10px; }
.pagehead h1 .rd { color: var(--red); }
.pagehead p { color: var(--mut); }
.pagehead .pimg { margin: 26px 0 0; max-width: 660px; border: 2px dashed var(--red); border-radius: var(--radius); padding: 8px; background: var(--paper); }
.pagehead .pimg img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 6px; }
.calc { background: var(--paper); border-radius: var(--radius); padding: 38px; margin: 32px 0; box-shadow: var(--shadow); border: 2px dashed var(--red); max-width: 740px; }
.calc .kicker { display: inline-block; background: var(--red-soft); color: var(--red-deep); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 7px 16px; border-radius: 999px; margin-bottom: 20px; border: 1px dashed var(--red); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--red-deep); font-family: var(--serif); font-size: 1.02rem; }
.field input, .field select { width: 100%; padding: 14px 18px; border: 2px solid var(--line); border-radius: var(--radius); font-size: 1rem; background: #fffdf6; color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--red); border-style: dashed; background: #fff; }
.field input.invalid { border-color: #c0392b; background: #fdf2f0; }
.field .hint { font-size: .84rem; color: var(--mut); margin-top: 6px; }
.field .error { font-size: .84rem; color: #c0392b; margin-top: 6px; display: none; font-weight: 600; }
.btn-row { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
button.calc-btn { background: var(--red); color: #fff; border: none; padding: 16px 32px; font-size: 1rem; font-weight: 800; cursor: pointer; flex: 1; border-radius: var(--radius); box-shadow: 0 8px 22px rgba(178,58,46,.35); transition: transform .15s; min-width: 200px; }
button.calc-btn:hover { transform: translateY(-2px); background: var(--red-deep); }
button.reset-btn { background: transparent; color: var(--mut); border: 2px dashed var(--line); padding: 16px 28px; cursor: pointer; font-weight: 700; border-radius: var(--radius); }
button.reset-btn:hover { border-color: var(--mut); }
.result { display: none; margin-top: 28px; background: var(--red-deep); border-radius: var(--radius); padding: 30px; color: #fff; border: 2px dashed rgba(250,244,230,.6); }
.result.show { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.result .big { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: #fff; }
.result .rrow { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.25); font-size: .95rem; }
.result .rrow:last-child { border-bottom: none; }
.result .rrow span:first-child { color: #f2c9bd; }
.result .note { font-size: .86rem; color: #f2c9bd; margin-top: 12px; }
article.prose { margin: 38px 0; max-width: 820px; }
article.prose h2 { font-size: 1.55rem; margin: 36px 0 12px; }
article.prose h3 { font-size: 1.12rem; margin: 26px 0 8px; color: var(--ink); }
article.prose p { margin-bottom: 14px; }
article.prose ul, article.prose ol { margin: 10px 0 18px 26px; }
article.prose li { margin-bottom: 8px; }
.example { background: var(--red-soft); border-radius: var(--radius); padding: 20px 24px; margin: 16px 0 26px; border: 2px dashed var(--red); }
.warnbox { background: #fbf3df; border: 2px dashed var(--red); border-radius: var(--radius); padding: 20px 24px; margin: 26px 0; }
.warnbox strong { color: var(--red-deep); }
details.faq { background: var(--paper); border: 2px dashed var(--line); border-radius: var(--radius); margin-bottom: 14px; padding: 6px 22px; box-shadow: var(--shadow); }
details.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--red-deep); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--red); flex-shrink: 0; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--mut); padding-bottom: 16px; }
footer.site { background: var(--red-deep); color: #f5ddd4; border-top: 3px dashed rgba(250,244,230,.5); }
footer.site .fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 56px 0 30px; }
footer.site h4 { font-family: var(--serif); color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
footer.site a { color: #f5ddd4; text-decoration: none; display: block; margin-bottom: 8px; font-size: .93rem; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site .bottom { border-top: 1px dashed rgba(255,255,255,.3); padding: 20px 0; font-size: .85rem; color: #e8b8ab; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } footer.site .fgrid { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 2.2rem; } .calc { padding: 26px 20px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
