/* The materials calculator (page-mohasebe-masaleh.php; 0.2.41, three steps + motion 0.2.43). Loaded only on that page.
   Every colour is a theme token, so the dark theme follows the header toggle. Motion stops for prefers-reduced-motion. */
.sk-calc { max-width: 620px; padding-top: 22px; padding-bottom: 48px; }
.sk-calc .sk-page-head h1 { color: var(--acc); }
.sk-calc-intro, .sk-calc-intro p { margin: 4px 0 0; color: var(--mut); font-size: 14px; }
.sk-calc .card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin: 0 0 16px; box-shadow: var(--shadow); }
.sk-calc .card h2 { margin: 0 0 10px; font-size: 18px; }

/* steps + progress */
.sk-calc .steps { display: flex; justify-content: space-between; list-style: none; margin: 0 0 10px; padding: 0; }
.sk-calc .steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--mut); transition: color .3s; }
.sk-calc .steps li b { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line); background: var(--sur); transition: all .35s; }
.sk-calc .steps li.on { color: var(--ink); }
.sk-calc .steps li.on b { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); transform: scale(1.12); }
.sk-calc .steps li.done b { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); }
.sk-calc .bar { height: 6px; border-radius: 6px; background: var(--sur); overflow: hidden; margin-bottom: 14px; }
.sk-calc .bar i { display: block; height: 100%; width: 33%; background: var(--acc); border-radius: 6px; transition: width .5s cubic-bezier(.3,.8,.3,1); }
.sk-calc .step { display: none; }
.sk-calc .step.on { display: block; animation: skcIn .38s ease both; }
.sk-calc .step.on.back { animation-name: skcBack; }
@keyframes skcIn { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes skcBack { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

/* inputs */
.sk-calc label.t { display: block; font-size: 13px; color: var(--mut); margin: 14px 0 6px; font-weight: 700; }
.sk-calc .u { display: block; font-size: 12px; color: var(--mut); margin-top: 4px; line-height: 1.7; }
.sk-calc .auto { font-style: normal; font-size: 11px; background: var(--acc-soft); color: var(--acc); border-radius: 10px; padding: 0 8px; margin-right: 4px; transition: opacity .3s; }
.sk-calc .auto.off { opacity: 0; }
.sk-calc .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-calc .opt { border: 2px solid var(--line); background: var(--sur); color: var(--ink); border-radius: 30px; padding: 7px 15px; font-weight: 700; font-size: 14px; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .12s; }
.sk-calc .opt:active, .sk-calc .pm:active, .sk-calc .go:active { transform: scale(.94); }
.sk-calc .opt.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.sk-calc .opt[disabled] { opacity: .45; cursor: not-allowed; }
.sk-calc .opt small { font-weight: 400; font-size: 11px; }
.sk-calc .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk-calc .num-in { display: flex; align-items: stretch; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); transition: border-color .2s; }
.sk-calc .num-in:focus-within { border-color: var(--acc); }
.sk-calc .num-in input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: 20px; padding: 9px 0; text-align: center; -moz-appearance: textfield; }
.sk-calc .num-in input::-webkit-outer-spin-button, .sk-calc .num-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sk-calc .num-in input:focus { outline: none; }
.sk-calc .num-in input.bump { animation: skcBump .25s ease; }
@keyframes skcBump { 50% { transform: scale(1.18); color: var(--acc); } }
.sk-calc .pm { width: 40px; flex: none; border: 0; background: var(--sur); color: var(--acc); font-size: 22px; font-weight: 700; cursor: pointer; transition: transform .12s; }
.sk-calc .sw { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 14px; cursor: pointer; }
.sk-calc .sw input { position: absolute; opacity: 0; }
.sk-calc .sw i { width: 44px; height: 24px; border-radius: 24px; background: var(--line); position: relative; transition: background .25s; flex: none; }
.sk-calc .sw i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: right .25s; box-shadow: 0 1px 3px #0004; }
.sk-calc .sw input:checked + i { background: var(--acc); }
.sk-calc .sw input:checked + i::after { right: 23px; }
.sk-calc .sw input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
/* 0.2.48: the ceramic-place toggles (stairs, parking), two to a row on a wide screen */
.sk-calc .tg, .sk-calc .tg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sk-calc .tg2 { grid-column: 1 / -1; }
.sk-calc .tg2[hidden] { display: none; }
.sk-calc .tg .sw { margin-top: 10px; }
@media (max-width: 420px) { .sk-calc .tg, .sk-calc .tg2 { grid-template-columns: 1fr; } }
.sk-calc .copy { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--mut); }
.sk-calc .more { margin-top: 14px; }
.sk-calc .more summary { cursor: pointer; color: var(--acc); font-weight: 700; font-size: 13px; }
.sk-calc .go { display: block; width: 100%; margin-top: 18px; padding: 14px; border: 0; border-radius: 16px; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 18px; cursor: pointer; transition: transform .12s, filter .2s; }
.sk-calc .go:hover { filter: brightness(1.06); }
.sk-calc .go.alt { background: var(--bg); color: var(--acc); border: 2px solid var(--acc); }
.sk-calc .nav2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* results */
.sk-calc #res { display: none; }
.sk-calc #res.on { display: block; }
.sk-calc #res.on > * { animation: skcUp .5s ease both; }
.sk-calc #res.on > :nth-child(2) { animation-delay: .08s; } .sk-calc #res.on > :nth-child(3) { animation-delay: .16s; } .sk-calc #res.on > :nth-child(4) { animation-delay: .24s; }
@keyframes skcUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.sk-calc .sum { display: flex; justify-content: space-between; align-items: center; background: var(--acc); color: var(--acc-ink); border-radius: 18px; padding: 14px 18px; margin-bottom: 12px; }
.sk-calc .sum .k { font-size: 13px; opacity: .9; }
.sk-calc .sum .v { font-size: 28px; font-weight: 700; }
.sk-calc .edit { border: 2px solid currentColor; background: transparent; color: inherit; border-radius: 30px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.sk-calc .opts.mini { align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--mut); }
.sk-calc .opts.mini .opt { padding: 4px 12px; font-size: 13px; }
.sk-calc .r { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); animation: skcRow .45s ease both; animation-delay: calc(var(--d, 0) * 90ms); }
.sk-calc .rows .r:first-child { border-top: 0; }
@keyframes skcRow { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.sk-calc .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--acc-soft); color: var(--acc); display: flex; align-items: center; justify-content: center; }
.sk-calc .ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* name and amount share the first line; the note runs under both, full width */
.sk-calc .r .ic { grid-column: 1; grid-row: 1 / span 2; }
.sk-calc .r .n { display: contents; font-weight: 700; }
.sk-calc .r .q { grid-column: 3; grid-row: 1; }
.sk-calc .r .n small { grid-column: 2 / -1; grid-row: 2; font-size: 12px; color: var(--mut); font-weight: 400; line-height: 1.6; }
.sk-calc .r .q { color: var(--acc); font-weight: 700; white-space: nowrap; text-align: left; font-variant-numeric: tabular-nums; }
.sk-calc .r.hi { background: var(--acc-soft); border-radius: 14px; padding: 11px 10px; border-top-color: transparent; }
/* the buying row: its amount is the longest, so it takes a line of its own */
.sk-calc .r.hi .ic { grid-row: 1 / span 3; }
.sk-calc .r.hi .q { grid-column: 2 / -1; grid-row: 2; text-align: right; font-size: 20px; transform-origin: right; }
.sk-calc .r.hi .n small { grid-row: 3; }
.sk-calc .r .q.flash { animation: skcFlash .6s ease; }
@keyframes skcFlash { 40% { transform: scale(1.15); } }
.sk-calc .wait { color: var(--mut); font-weight: 400; font-size: 13px; }
.sk-calc .soon { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--mut); }
.sk-calc .cta { text-align: center; }
.sk-calc .cta a { color: var(--acc); font-weight: 700; font-size: 20px; }
.sk-calc .warn { border-color: var(--acc); background: var(--acc-soft); }
.sk-calc .warn h2 { color: var(--acc); }
.sk-calc .warn p { margin: 0; font-size: 14px; }
.sk-calc .pfoot { display: none; }
/* 0.2.47: version line, home-screen button and hint, update bar */
.sk-calc .appbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sk-calc .inst { border: 1px solid var(--acc); background: var(--acc-soft); color: var(--acc); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sk-calc .ver { font-size: 12px; color: var(--mut); }
.sk-calc .insthint { margin-top: 10px; background: var(--sur); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.9; color: var(--ink); }
.sk-calc .updbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; display: flex; align-items: center; gap: 10px; max-width: 596px; margin: 0 auto;
	background: #1E7B3C; color: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; font-weight: 700; animation: skcUp .35s ease both; }
.sk-calc .updbar[hidden] { display: none; }
.sk-calc .updbar span { flex: 1; }
.sk-calc .updbar #updgo { background: #fff; color: #1E7B3C; border: 0; border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 800; cursor: pointer; }
.sk-calc .updbar #updx { background: transparent; color: #fff; border: 0; font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer; }
@keyframes skcUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.sk-calc *, .sk-calc *::before, .sk-calc *::after { animation: none !important; transition: none !important; }
}
@media print {
	.sk-skip, .sk-topbar, .sk-header, .sk-footer, .sk-calc #inputs, .sk-calc .exp, .sk-calc .edit, .sk-calc .opts.mini, .sk-calc .appbar, .sk-calc .insthint, .sk-calc .updbar { display: none !important; }
	.sk-calc *, .sk-calc #res.on > * { animation: none !important; }
	/* a printout is always light, whatever the header toggle says */
	body, .sk-calc .card, .sk-calc .cta { background: #fff !important; color: #000 !important; }
	.sk-calc .warn { background: #FBE7EA !important; }
	.sk-calc .r, .sk-calc .card { border-color: #E2E5EA !important; }
	.sk-calc .r.hi { background: #FBE7EA !important; }
	.sk-calc .r .n small, .sk-calc .wait, .sk-calc .soon, .sk-calc-intro { color: #555 !important; }
	.sk-calc .r .q, .sk-calc .warn h2, .sk-calc .cta a, .sk-calc .sk-page-head h1, .sk-calc .ic { color: #C8102E !important; }
	.sk-calc .ic { background: #FBE7EA !important; }
	.sk-calc .sum { background: #C8102E !important; color: #fff !important; }
	.sk-calc { max-width: none; }
	.sk-calc .card { box-shadow: none; break-inside: avoid; }
	.sk-calc .pfoot { display: flex; gap: 16px; align-items: center; border-top: 2px solid #C8102E; padding-top: 12px; margin-top: 8px; font-size: 14px; }
	.sk-calc .pfoot svg { width: 90px; height: auto; color: #1B1F26; }
}
