/*
Theme Name: EduWritingFormat
Theme URI: https://eduwritingformat.com/
Description: Writing formats, model answers and project pages for students. Plum format blueprint design with the format x-ray hero, A4 sheet cards, project front page maker and acknowledgement maker.
Version: 1.0.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: eduwritingformat
*/

@font-face { font-family: "EW Head"; src: url(assets/fonts/hubot-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/hubot-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/hubot-sans-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/hubot-sans-latin-900-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "EW Text"; src: url(assets/fonts/sofia-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EW Text"; src: url(assets/fonts/sofia-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "EW Text"; src: url(assets/fonts/sofia-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EW Text"; src: url(assets/fonts/biryani-devanagari-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Text"; src: url(assets/fonts/biryani-devanagari-700-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Text"; src: url(assets/fonts/biryani-devanagari-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/biryani-devanagari-700-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/biryani-devanagari-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/biryani-devanagari-700-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Head"; src: url(assets/fonts/biryani-devanagari-700-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "EW Mono"; src: url(assets/fonts/sometype-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "EW Mono"; src: url(assets/fonts/sometype-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
/* the tools draw on a canvas with these names */
@font-face { font-family: "Hubot Sans"; src: url(assets/fonts/hubot-sans-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url(assets/fonts/sofia-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600;  font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url(assets/fonts/sofia-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--plum: #2b1747; --plum-2: #432566; --ink: #1d1030; --muted: #625878; --paper: #f6f3fb; --card: #ffffff; --line: #e3dcef; --soft: #efe9f8;
	--coral: #ff5e57; --coral-ink: #c8352f; --aqua: #12b5a6; --aqua-ink: #0b7d73; --saffron: #ffb020; --saffron-ink: #8f5a00; --violet: #7b5cff;
	--r: 20px; --shadow: 0 1px 2px rgba(43, 23, 71, .06), 0 10px 30px -12px rgba(43, 23, 71, .22);
	--head: "EW Head", system-ui, sans-serif; --text: "EW Text", system-ui, sans-serif; --mono: "EW Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.62 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum-2); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: rgba(123, 92, 255, .45); }
a:hover { color: var(--coral-ink); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -.02em; color: var(--ink); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 6px; }
.ew-wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }
.ew-skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 99; border-radius: 10px; }
.ew-skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- header */
.ew-top { position: sticky; top: 0; z-index: 40; background: var(--plum); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.ew-top-row { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.ew-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 21px/1 var(--head); letter-spacing: -.02em; margin-right: auto; }
.ew-logo b { color: var(--saffron); font-weight: 800; }
.ew-logo img { border-radius: 9px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .16); }
.ew-logo:hover { color: #fff; }
.ew-tabs { display: flex; gap: 4px; align-self: stretch; align-items: flex-end; }
.ew-tabs a { display: flex; align-items: center; gap: 8px; color: #e9e1f7; text-decoration: none; font: 700 15px/1 var(--head); padding: 13px 16px 14px; border-radius: 14px 14px 0 0; position: relative; }
.ew-tabs a i { width: 9px; height: 9px; border-radius: 3px; background: var(--st); transform: rotate(45deg); }
.ew-tabs a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ew-cta { background: var(--saffron); color: var(--ink); text-decoration: none; font: 800 15px/1 var(--head); padding: 12px 16px; border-radius: 999px; white-space: nowrap; box-shadow: 0 6px 18px -6px rgba(255, 176, 32, .7); }
.ew-cta:hover { background: #ffc552; color: var(--ink); }
.ew-menubtn { display: none; align-items: center; gap: 8px; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 12px; padding: 10px 12px; font: 700 15px var(--head); cursor: pointer; }
.ew-menubtn-bars, .ew-menubtn-bars::before, .ew-menubtn-bars::after { width: 18px; height: 2px; background: currentColor; display: block; position: relative; border-radius: 2px; }
.ew-menubtn-bars::before, .ew-menubtn-bars::after { content: ""; position: absolute; }
.ew-menubtn-bars::before { top: -6px; } .ew-menubtn-bars::after { top: 6px; }
.ew-drawer { background: var(--plum-2); border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0 24px; }
.ew-drawer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.ew-drawer-h { font: 800 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--st, #fff); margin: 0 0 10px; }
.ew-drawer ul { list-style: none; margin: 0; padding: 0; }
.ew-drawer a { color: #fff; text-decoration: none; display: block; padding: 6px 0; font-weight: 600; }
.ew-drawer a:hover { color: var(--saffron); }
.ew-drawer-all { color: var(--saffron) !important; }

/* ---------------------------------------------------------------- hero */
.ew-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 0 72px;
	background: radial-gradient(600px 380px at 85% 20%, rgba(123, 92, 255, .55), transparent 70%), radial-gradient(520px 340px at 10% 110%, rgba(18, 181, 166, .35), transparent 70%),
	radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.6px) 0 0/22px 22px, linear-gradient(160deg, var(--plum) 0%, #1a0d2e 100%); }
.ew-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.ew-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #d9ccf3; background: rgba(255, 255, 255, .08); padding: 9px 14px; border-radius: 999px; margin: 0 0 18px; }
.ew-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 4px rgba(18, 181, 166, .25); }
.ew-hero h1 { color: #fff; font-size: clamp(38px, 5.6vw, 66px); font-weight: 900; margin: 0 0 16px; letter-spacing: -.035em; }
.ew-hero-lede { font-size: 20px; color: #e5dcf4; max-width: 40ch; margin: 0 0 26px; }
.ew-finder { position: relative; max-width: 560px; }
.ew-finder label { font: 700 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #cbbbe8; display: block; margin-bottom: 8px; }
.ew-finder-box { position: relative; }
.ew-finder-box input { width: 100%; font: 600 18px var(--text); padding: 17px 52px 17px 20px; border-radius: 16px; border: 0; background: #fff; color: var(--ink); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); }
.ew-finder-box span { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--plum-2); }
.ew-finder-out { position: absolute; left: 0; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 8px; background: #fff; border-radius: 16px; box-shadow: var(--shadow), 0 24px 48px -20px rgba(0, 0, 0, .5); z-index: 5; }
.ew-finder-out a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.ew-finder-out a:hover, .ew-finder-out a:focus { background: var(--soft); }
.ew-finder-out b { display: block; font-family: var(--head); }
.ew-finder-out span, .ew-finder-none { color: var(--muted); font-size: 15px; }
.ew-finder-none { padding: 10px 12px; }
.ew-hero-streams { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ew-hero-streams a { display: inline-flex; align-items: baseline; gap: 8px; color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); font-weight: 600; }
.ew-hero-streams b { font: 900 20px/1 var(--head); color: var(--st); }
.ew-hero-streams a:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* format x-ray */
.ew-xray { position: relative; display: grid; grid-template-columns: minmax(250px, 330px) auto; gap: 18px; align-items: center; justify-content: end; }
.ew-xray-sheet { background: #fff; color: var(--ink); border-radius: 14px; padding: 26px 24px 30px; transform: rotate(-2.5deg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); aspect-ratio: 1 / 1.3; position: relative; }
.ew-xray-sheet::after { content: ""; position: absolute; top: 0; right: 0; width: 44px; height: 44px; background: linear-gradient(225deg, var(--paper) 50%, #d8cdeb 50%); border-radius: 0 14px 0 8px; }
.ew-xray-tag { font: 700 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.ew-z { border: 2px dashed transparent; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; transition: background .25s, border-color .25s, transform .25s; }
.ew-z b { font: 900 17px/1.15 var(--head); letter-spacing: -.01em; }
.ew-z2 { font: 600 14px var(--text); color: var(--muted); }
.ew-z i { display: block; height: 8px; border-radius: 6px; background: #e7e1f1; margin: 7px 0; }
.ew-z.is-on { background: rgba(255, 176, 32, .16); border-color: var(--saffron); transform: translateX(4px); }
.ew-z.is-on i { background: #f3cf86; }
.ew-xray-keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ew-xray-keys li { display: flex; align-items: center; gap: 10px; padding: 9px 13px 9px 9px; background: rgba(255, 255, 255, .08); border-radius: 12px; font: 600 15px var(--text); color: #eadff8; cursor: pointer; white-space: nowrap; transition: background .25s, color .25s; }
.ew-xray-keys span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); font: 800 14px var(--head); }
.ew-xray-keys li.is-on { background: var(--saffron); color: var(--ink); }
.ew-xray-keys li.is-on span { background: var(--ink); color: var(--saffron); }

/* ---------------------------------------------------------------- page head */
.ew-pagehead { background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); padding: 26px 0 34px; position: relative; overflow: hidden; }
.ew-pagehead::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 420px; height: 420px; background: radial-gradient(closest-side, color-mix(in srgb, var(--st, #7b5cff) 22%, transparent), transparent); transform: translate(30%, -40%); pointer-events: none; }
.ew-pagehead-grid { display: grid; grid-template-columns: 1fr 220px; gap: 40px; align-items: end; position: relative; }
.ew-pagehead-grid--solo { grid-template-columns: 1fr; }
.ew-trail { font: 600 14px var(--text); color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ew-trail a { color: var(--muted); text-decoration: none; }
.ew-trail a:hover { color: var(--coral-ink); }
.ew-pagehead-kind { display: flex; gap: 10px; align-items: center; font: 700 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.ew-pagehead-kind span { background: var(--st); color: var(--ink); padding: 5px 10px; border-radius: 8px; }
.ew-pagehead h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 900; margin: 0 0 12px; max-width: 24ch; }
.ew-pagehead-short { font-size: 20px; color: var(--muted); margin: 0 0 14px; max-width: 54ch; }
.ew-pagehead-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ew-pagehead-meta span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: 600 14px var(--text); color: var(--plum-2); }
.ew-pagehead-sheet { margin: 0; transform: rotate(2.5deg); }
.ew-pagehead-sheet img { border-radius: 12px; box-shadow: 0 24px 40px -18px rgba(43, 23, 71, .45); }

/* ---------------------------------------------------------------- reading layout */
.ew-read { padding: 36px 0 60px; }
.ew-read--narrow { max-width: 820px; }
.ew-article { min-width: 0; }
.ew-kind-hub .ew-article, .ew-kind-guide .ew-article, .ew-kind-gallery .ew-article, .ew-kind-tool .ew-article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 44px; align-items: start; }
.ew-article > * { grid-column: 1; }
.ew-article > .ew-toc { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 90px; }
.ew-article p, .ew-article li { max-width: 72ch; }
.ew-article h2 { font-size: clamp(25px, 3vw, 32px); font-weight: 800; margin: 0 0 16px; }
.ew-article h3 { font-size: 21px; font-weight: 800; margin: 26px 0 10px; }
.ew-intro { font-size: 20px; }
.ew-intro p:first-child { margin-top: 0; }
.ew-part { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px 30px; margin: 0 0 22px; border-top: 5px solid var(--st); }
.ew-part > :last-child { margin-bottom: 0; }

.ew-key { background: var(--plum); color: #fff; border-radius: var(--r); padding: 22px 24px; margin: 24px 0; }
.ew-key-h { font: 800 13px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--saffron); margin: 0 0 12px; }
.ew-key ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ew-key li { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px 14px; }
.ew-key-name { font: 700 13px var(--text); color: #cfc2e8; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.ew-key-val { font: 700 17px/1.35 var(--head); }
.ew-key-val a { color: #fff; }

.ew-toc { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 18px 14px; font-size: 15px; }
.ew-toc p { font: 800 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.ew-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.ew-toc li { counter-increment: t; }
.ew-toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); line-height: 1.3; }
.ew-toc a::before { content: counter(t, decimal-leading-zero); font: 700 12px/1.6 var(--mono); color: var(--muted); }
.ew-toc a:hover, .ew-toc a[aria-current] { background: var(--soft); }
.ew-toc a[aria-current]::before { color: var(--coral-ink); }

/* content boxes */
.ew-article .format { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 22px 22px 18px; margin: 18px 0; font-size: 17px; position: relative; box-shadow: 8px 8px 0 color-mix(in srgb, var(--st, #ffb020) 55%, transparent); }
.ew-article .format::before { content: "Format"; position: absolute; top: -13px; left: 16px; background: var(--ink); color: #fff; font: 700 12px/1 var(--mono); padding: 6px 10px; border-radius: 8px; letter-spacing: .06em; text-transform: uppercase; }
.ew-article .format p { margin: 0 0 8px; }
.ew-article .example { background: #fffdf6; border-left: 6px solid var(--saffron); border-radius: 0 16px 16px 0; padding: 18px 22px 46px; margin: 18px 0; position: relative; }
.ew-article .example::before { content: "Model answer"; display: block; font: 700 12px var(--mono); color: var(--saffron-ink); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.ew-article .passage { background: #f2fbfa; border-radius: 16px; padding: 20px 22px; margin: 18px 0; border: 1px solid #bfe8e3; }
.ew-article .passage::before { content: "Read the passage"; display: block; font: 700 12px var(--mono); color: var(--aqua-ink); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.ew-article .passage[lang="hi"]::before, [lang="hi"] .passage::before { content: "गद्यांश पढ़िए"; }
.ew-article .answer { background: #f1fbf4; border: 1px dashed #5cb784; border-radius: 14px; padding: 16px 20px; margin: 14px 0; }
.ew-article .answer::before { content: "Answer key"; display: block; font: 700 12px var(--mono); color: #2b7a4b; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
[lang="hi"] .answer::before { content: "उत्तर"; }
[lang="hi"] .example::before { content: "नमूना उत्तर"; }
.ew-article .note { background: var(--soft); border-radius: 14px; padding: 14px 18px; margin: 16px 0; font-size: 17px; }
.ew-article .blank { display: inline-block; min-width: 4em; border-bottom: 2px dotted var(--muted); color: var(--muted); font-style: italic; padding: 0 4px; }
.ew-article .tag { display: inline-block; background: var(--ink); color: #fff; font: 700 12px/1.6 var(--mono); padding: 1px 8px; border-radius: 6px; margin-right: 6px; text-transform: uppercase; letter-spacing: .04em; vertical-align: 2px; }
.ew-copy { position: absolute; right: 12px; bottom: 10px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font: 700 13px var(--head); cursor: pointer; }
.ew-copy:hover { background: var(--coral-ink); }
.ew-table { overflow-x: auto; margin: 16px 0; border-radius: 14px; border: 1px solid var(--line); }
.ew-article table { border-collapse: collapse; width: 100%; font-size: 16px; background: #fff; }
.ew-article th, .ew-article td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.ew-article thead th { background: var(--soft); font: 700 14px var(--head); color: var(--plum-2); }
.ew-article tbody tr:last-child td { border-bottom: 0; }
.ew-faq { margin-top: 30px; }
.ew-faq details { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.ew-faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font: 700 18px/1.35 var(--head); list-style: none; position: relative; }
.ew-faq summary::-webkit-details-marker { display: none; }
.ew-faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; width: 28px; height: 28px; border-radius: 9px; background: var(--soft); display: grid; place-items: center; font: 800 18px var(--head); color: var(--plum-2); }
.ew-faq details[open] summary::after { content: "−"; background: var(--saffron); color: var(--ink); }
.ew-faq-a { padding: 0 20px 16px; }
.ew-faq-a p { margin: 0; }
.ew-ad { margin: 24px 0; text-align: center; }

/* gallery designs */
.ew-designs { list-style: none; margin: 10px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.ew-design { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.ew-design figure { margin: 0; background: linear-gradient(160deg, var(--soft), #fff); padding: 16px 16px 0; }
.ew-design img { border-radius: 8px 8px 0 0; box-shadow: 0 -2px 12px rgba(43, 23, 71, .12); aspect-ratio: 900 / 1273; object-fit: cover; width: 100%; }
.ew-design-body { padding: 14px 16px 16px; }
.ew-design h3 { margin: 0 0 6px; font-size: 18px; }
.ew-design p { font-size: 15px; margin: 0 0 10px; color: var(--muted); }
.ew-design dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; }
.ew-design dt { font: 700 12px/1.7 var(--mono); text-transform: uppercase; color: var(--plum-2); }
.ew-design dd { margin: 0; }

/* related */
.ew-related { margin-top: 40px; }
.ew-related h2 { font-size: 26px; }
.ew-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.ew-related a { display: block; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; text-decoration: none; color: var(--ink); height: 100%; transition: transform .2s; }
.ew-related a:hover { transform: translateY(-3px); }
.ew-related img { border-radius: 8px; margin-bottom: 10px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.ew-related b { display: block; font: 800 16px/1.25 var(--head); }
.ew-related span { font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- index tables */
.ew-home-body { padding: 44px 0 10px; max-width: 900px; }
.ew-article--home .ew-part { border-top-color: var(--violet); }
.ew-indexes { padding: 10px 0 50px; display: grid; gap: 28px; }
.ew-index { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; border-left: 8px solid var(--st); }
.ew-index-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ew-index h2 { margin: 0; font-size: 26px; }
.ew-index h2 small { font: 700 14px var(--mono); color: var(--muted); margin-left: 6px; }
.ew-filter { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 12px; padding: 4px 4px 4px 12px; }
.ew-filter span { font: 700 12px var(--mono); text-transform: uppercase; color: var(--muted); }
.ew-filter input { border: 0; background: #fff; border-radius: 9px; padding: 9px 12px; font: 600 16px var(--text); min-width: 220px; }
.ew-index-table { overflow-x: auto; }
.ew-index table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ew-index th { text-align: left; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.ew-index td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ew-index td:first-child a { font: 700 16px var(--head); text-decoration: none; color: var(--ink); }
.ew-index td:first-child a:hover { color: var(--coral-ink); }
.ew-index td:nth-child(2) { color: var(--muted); }
.ew-row--hub td:first-child a::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--st); transform: rotate(45deg); margin-right: 9px; vertical-align: 2px; }
.ew-kind { font: 700 12px var(--mono); white-space: nowrap; color: var(--plum-2); background: var(--soft); padding: 3px 8px; border-radius: 6px; }
.ew-index-none { color: var(--muted); }

/* ---------------------------------------------------------------- tools */
.ew-tool { margin: 26px 0; }
.ew-maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; background: var(--plum); border-radius: 24px; padding: 24px; color: #fff; }
.ew-maker-h { font: 900 22px var(--head); margin: 0 0 14px; }
.ew-f { display: block; margin-bottom: 10px; }
.ew-f > span { display: block; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #cbbbe8; margin-bottom: 4px; }
.ew-f input, .ew-f select { width: 100%; border: 0; border-radius: 12px; padding: 11px 13px; font: 600 16px var(--text); background: #fff; color: var(--ink); }
.ew-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ew-sws { display: flex; flex-wrap: wrap; gap: 8px; }
.ew-sw { position: relative; cursor: pointer; }
.ew-sw input { position: absolute; opacity: 0; }
.ew-sw span { display: block; padding: 7px 12px 7px 30px; border-radius: 999px; background: rgba(255, 255, 255, .1); font: 600 14px var(--text); text-transform: capitalize; position: relative; }
.ew-sw span::before { content: ""; position: absolute; left: 9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--b); }
.ew-sw input:checked + span { background: #fff; color: var(--ink); }
.ew-sw input:focus-visible + span { outline: 3px solid var(--saffron); }
.ew-maker-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ew-btn { border: 0; border-radius: 999px; padding: 12px 18px; font: 800 15px var(--head); cursor: pointer; background: rgba(255, 255, 255, .14); color: #fff; }
.ew-btn--main { background: var(--saffron); color: var(--ink); }
.ew-btn:hover { filter: brightness(1.08); }
.ew-maker-note { font-size: 14px; color: #cbbbe8; margin: 12px 0 0; }
.ew-maker-prev { background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 16px; display: grid; place-items: center; }
.ew-maker-prev canvas { width: 100%; max-width: 380px; height: auto; border-radius: 6px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); background: #fff; }
.ew-maker-out { background: #fff; color: var(--ink); border-radius: 16px; padding: 22px; }
.ew-ack-h { font: 900 20px var(--head); text-align: center; text-decoration: underline; text-underline-offset: 6px; margin: 0 0 14px; }
.ew-ack-text p { margin: 0 0 12px; font-size: 17px; }
.ew-ack-sign { text-align: right; font-weight: 700; }

/* ---------------------------------------------------------------- tiles, blog, misc */
.ew-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.ew-tile a { display: block; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 10px; text-decoration: none; color: var(--ink); }
.ew-tile-img img { border-radius: 8px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.ew-tile-body { display: block; padding: 8px 4px 2px; }
.ew-tile-name { display: block; font: 800 15px/1.25 var(--head); }
.ew-tile-meta { font-size: 13px; color: var(--muted); }
.ew-tile-badge { position: absolute; }
.ew-guides { margin-top: 36px; }
.ew-guides-h { font: 800 20px var(--head); }
.ew-list-title { padding: 34px 0 10px; }
.ew-postlist { display: grid; gap: 14px; padding-bottom: 50px; }
.ew-postrow { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 22px; }
.ew-postrow h2 { font-size: 22px; margin: 0 0 4px; }
.ew-postrow h2 a { text-decoration: none; color: var(--ink); }
.ew-date { font: 600 14px var(--mono); color: var(--muted); margin: 0; }
.ew-pager { padding-bottom: 40px; }
.ew-latest { padding: 10px 0 50px; }
.ew-latest ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ew-latest a { display: block; background: var(--card); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.ew-latest b { display: block; font-family: var(--head); }
.ew-latest small { color: var(--muted); }
.ew-latest-more { display: inline-block; margin-top: 14px; font-weight: 700; }
.ew-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.ew-article--post img { border-radius: 14px; }

/* ---------------------------------------------------------------- footer */
.ew-foot { background: #ece5f8; color: var(--ink); padding: 44px 0 26px; margin-top: 20px; border-top: 1px solid var(--line); }
.ew-foot-band { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; padding-bottom: 26px; border-bottom: 1px solid #d6cbea; }
.ew-foot-word { margin: 0; font: 900 clamp(40px, 7vw, 84px)/.9 var(--head); letter-spacing: -.045em; color: transparent; -webkit-text-stroke: 2px var(--plum); }
.ew-foot-line { margin: 0; color: var(--muted); max-width: 46ch; }
.ew-foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 26px 0; }
.ew-foot-h { font: 800 13px var(--mono); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.ew-foot-h::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--st, var(--plum)); }
.ew-foot ul { list-style: none; margin: 0; padding: 0; }
.ew-foot li a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: 16px; }
.ew-foot li a:hover { color: var(--coral-ink); }
.ew-foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); padding-top: 18px; border-top: 1px solid #d6cbea; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
	.ew-tabs { display: none; }
	.ew-menubtn { display: inline-flex; }
	.ew-kind-hub .ew-article, .ew-kind-guide .ew-article, .ew-kind-gallery .ew-article, .ew-kind-tool .ew-article { display: block; }
	.ew-article > .ew-toc { position: static; margin: 0 0 22px; }
}
@media (max-width: 1080px) {
	.ew-hero-grid { grid-template-columns: 1fr; gap: 34px; }
	.ew-xray { justify-content: start; }
}
@media (max-width: 860px) {
	.ew-hero { padding: 36px 0 48px; }
	.ew-xray { grid-template-columns: minmax(0, 330px); }
	.ew-xray-keys { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
	.ew-xray-keys li { white-space: normal; }
	.ew-pagehead-grid { grid-template-columns: 1fr 120px; gap: 18px; }
	.ew-maker { grid-template-columns: 1fr; }
	.ew-foot-grid { grid-template-columns: 1fr 1fr; }
	.ew-foot-band { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 560px) {
	body { font-size: 17px; }
	.ew-cta { display: none; }
	.ew-logo { font-size: 18px; }
	.ew-menubtn-t { display: none; }
	.ew-pagehead-grid { grid-template-columns: 1fr; }
	.ew-pagehead-sheet { display: none; }
	.ew-part { padding: 20px 18px; border-radius: 16px; }
	.ew-index { padding: 18px 14px; border-left-width: 6px; }
	.ew-filter, .ew-filter input { width: 100%; min-width: 0; }
	.ew-index td:nth-child(3), .ew-index th:nth-child(3) { display: none; }
	.ew-foot-grid { grid-template-columns: 1fr; }
	.ew-designs { grid-template-columns: 1fr 1fr; gap: 10px; }
	.ew-design figure { padding: 10px 10px 0; }
	.ew-design-body { padding: 10px 10px 12px; }
	.ew-design h3 { font-size: 15px; }
	.ew-design p { font-size: 13.5px; line-height: 1.4; }
	.ew-gallery.ew-part { padding: 18px 12px; }
	.ew-design dl { display: none; }
	.ew-intro { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .ew-top, .ew-foot, .ew-toc, .ew-related, .ew-copy, .ew-tool { display: none !important; } body { background: #fff; } .ew-part { box-shadow: none; border: 1px solid #ccc; } }
