/* Rythia US Marketing Hub. Colours and type from the brand guidelines of 2026-11-13:
   Deep Sleep Blue #006198 carries the brand; Warm White #F4EFE7 is the ground; Apricot #FFB16E is a small accent.
   Light grounds hold the content, blue opens and closes. Rubik, Light for big headlines, Medium for names. No bold. */
@font-face { font-family: Rubik; src: url(brand/fonts/Rubik-Light.woff) format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: Rubik; src: url(brand/fonts/Rubik-Regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: Rubik; src: url(brand/fonts/Rubik-Medium.woff) format('woff'); font-weight: 500; font-display: swap; }

:root {
  --blue: #006198; --deep: #004F71; --linen: #F4EFE7; --linen-2: #E8E3D9; --orange: #FFB16E; --mist: #7FB6C6;
  --divider: #D9DEDC; --grey: #7F7F7F; --ink: #5C6A73; --text: #1D2B33; --white: #FFFFFF;
  --r-btn: 4px; --r-card: 8px;
  --font: Rubik, "PingFang TC", "PingFang SC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--linen); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
h1, h2, h3 { font-weight: 400; margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.signin-side { position: relative; background: var(--blue); color: var(--linen); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.signin-side .wave { position: absolute; inset: 0; opacity: .07; pointer-events: none; }
.signin-side img.lockup { height: 34px; width: auto; position: relative; }
.signin-side .claim { position: relative; font-weight: 300; font-size: clamp(40px, 5vw, 76px); line-height: 1.02; letter-spacing: -.01em; max-width: 10ch; animation: rise .9s var(--ease) both; }
.signin-side .credit { position: relative; font-size: 13px; color: var(--mist); }
.signin-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.signin-card { width: min(420px, 100%); animation: rise .7s .1s var(--ease) both; }
.signin-card h1 { font-weight: 300; font-size: 40px; line-height: 1.05; color: var(--blue); }
.signin-card .lead { color: var(--ink); margin: 14px 0 28px; }
.signin-card .gbtn { min-height: 44px; }
.signin-card .fine { font-size: 13px; color: var(--grey); margin-top: 16px; }
.sform { display: grid; gap: 14px; margin: 0; }
.kicker.mail { text-transform: none; letter-spacing: .02em; font-size: 12px; }
.email-in { display: flex; align-items: center; border: 1px solid var(--divider); border-radius: var(--r-btn); background: var(--white); transition: border-color .2s, box-shadow .2s; }
.email-in:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 97, 152, .12); }
.field .email-in input, .field .email-in input:focus { flex: 1; min-width: 0; border: 0; box-shadow: none; background: transparent; height: 46px; padding: 0 0 0 12px; font-size: 16px; }
.email-in .suffix { padding: 0 12px 0 1px; color: var(--grey); font-size: 16px; white-space: nowrap; }
.email-in.full .suffix { display: none; }
.field .email-in.full input { padding-right: 12px; }
.field input.code-in { height: 58px; font-size: 28px; letter-spacing: .32em; text-indent: .32em; text-align: center; font-variant-numeric: tabular-nums; color: var(--blue); }
.btn.block { width: 100%; min-height: 46px; font-size: 15px; }
.stack { display: grid; gap: 10px; }
.signin-card .stack { margin-top: 4px; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.linkish[disabled] { color: var(--grey); text-decoration: none; cursor: default; }
.links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.signin-card .alert { margin-top: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--grey); font-size: 12px; margin: 24px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.lang-row { margin-top: 28px; }
.side-col { display: grid; gap: 16px; }
.security .dl { margin: 12px 0 0; font-size: 13px; }
.security h3 { font-size: 13px; font-weight: 500; color: var(--blue); margin: 18px 0 8px; }
.keys { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.keys li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--linen); border-radius: var(--r-btn); font-size: 13px; }
.keys b { font-weight: 500; display: block; }
.keys small { color: var(--grey); font-size: 12px; }
.sep { height: 1px; background: var(--divider); margin: 18px 0 14px; }
.drawer.confirm .code-in { max-width: 260px; }
.devbox { margin-top: 32px; padding: 18px; border: 1px dashed var(--mist); border-radius: var(--r-card); background: var(--white); }
.devbox h2 { font-size: 14px; font-weight: 500; color: var(--blue); }
.devbox p { font-size: 12px; color: var(--grey); margin: 4px 0 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--white); border-right: 1px solid var(--divider); padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
.side .brand img { height: 24px; width: auto; }
.side .brand span { font-size: 12px; color: var(--grey); border-left: 1px solid var(--divider); padding-left: 10px; line-height: 1.2; }
.nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); padding: 18px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-btn); color: var(--text); text-decoration: none; font-size: 14px; transition: background .2s; }
.nav a svg { width: 18px; height: 18px; flex: none; color: var(--ink); }
.nav a:hover { background: var(--linen); }
.nav a[aria-current="page"] { background: var(--linen); color: var(--blue); font-weight: 500; }
.nav a[aria-current="page"] svg { color: var(--blue); }
.nav .count { margin-left: auto; font-size: 12px; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--blue); color: var(--white); }
.side .me { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--divider); display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--linen); display: grid; place-items: center; font-size: 13px; font-weight: 500; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me .who { min-width: 0; font-size: 13px; line-height: 1.3; }
.me .who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { color: var(--grey); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .row { grid-column: 1 / -1; display: flex; gap: 8px; }
.topbar { display: none; }
main.page { padding: 40px clamp(20px, 4vw, 56px) 80px; min-width: 0; animation: fade .35s var(--ease); }

/* ---------- type and parts ---------- */
.head { margin-bottom: 28px; }
.head h1 { font-weight: 300; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.05; color: var(--blue); letter-spacing: -.005em; }
.head .rule { width: 48px; height: 3px; background: var(--orange); margin: 18px 0 0; }
.head p { color: var(--ink); max-width: 62ch; margin: 14px 0 0; }
.kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 0 0 10px; }
.card { background: var(--white); border-radius: var(--r-card); padding: 22px; }
.grid { display: grid; gap: 16px; }
.muted { color: var(--grey); }
.small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--blue); background: var(--blue); color: var(--white); cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s, transform .15s; }
.btn:hover { background: var(--deep); border-color: var(--deep); }
.btn:active { transform: translateY(1px); }
.btn.line { background: transparent; color: var(--blue); }
.btn.line:hover { background: var(--linen); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink); }
.btn.quiet:hover { background: var(--linen); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--divider); border-radius: var(--r-btn); background: var(--white); font-size: 14px; color: var(--text); transition: border-color .2s; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 97, 152, .12); }
.field input[readonly] { background: var(--linen); color: var(--ink); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.seg { display: inline-flex; background: var(--linen); border-radius: var(--r-btn); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 3px; font-size: 13px; color: var(--ink); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--blue); font-weight: 500; }
.note { border-left: 3px solid var(--orange); background: var(--white); padding: 12px 14px; border-radius: 0 var(--r-btn) var(--r-btn) 0; font-size: 13px; color: var(--ink); }
.alert { border-left: 3px solid var(--deep); background: var(--white); padding: 12px 14px; border-radius: 0 var(--r-btn) var(--r-btn) 0; font-size: 13px; color: var(--deep); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--blue); color: var(--white); padding: 11px 18px; border-radius: var(--r-btn); font-size: 14px; z-index: 50; animation: rise .3s var(--ease); max-width: calc(100vw - 32px); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; border: 1px solid var(--divider); color: var(--ink); white-space: nowrap; }
.pill.submitted { border-color: var(--blue); color: var(--blue); }
.pill.approved { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pill.printed { background: var(--linen-2); border-color: var(--linen-2); color: var(--text); }
.pill.rejected, .pill.cancelled { color: var(--grey); }
.pill.admin { border-color: var(--orange); color: #9A5410; }
.empty { color: var(--grey); padding: 28px 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; margin: 0; }
.dl dt { color: var(--grey); }
.dl dd { margin: 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13px; color: var(--ink); align-items: start; }
.steps li::before { content: counter(s, decimal-leading-zero); color: var(--orange); font-weight: 500; font-size: 13px; }

/* ---------- home ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.identity { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; }
.identity .badge-mini svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.progress { height: 6px; border-radius: 99px; background: var(--linen); overflow: hidden; margin: 10px 0 12px; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .6s var(--ease); }
.todo { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: 14px; }
.todo li { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.todo li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--divider); }
.todo li.done { color: var(--grey); text-decoration: line-through; text-decoration-color: var(--divider); }
.todo li.done .dot { background: var(--blue); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.tile { background: var(--white); border-radius: var(--r-card); padding: 0; text-decoration: none; color: var(--text); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease); }
.tile:hover { transform: translateY(-3px); }
.tile .thumb { aspect-ratio: 4 / 3; background: var(--linen-2); display: grid; place-items: center; padding: 18px; overflow: hidden; }
.tile .thumb svg { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; transition: transform .6s var(--ease); }
.tile:hover .thumb svg { transform: scale(1.04); }
.tile .thumb .sig { background: var(--white); border-radius: 4px; padding: 10px; transform: scale(.82); transform-origin: center; }
.tile .label { padding: 14px 16px 16px; }
.tile .label b { font-weight: 500; display: block; }
.tile .label small { color: var(--grey); }

/* ---------- studio ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chips a { padding: 7px 14px; border-radius: 99px; background: var(--white); color: var(--ink); text-decoration: none; font-size: 13px; border: 1px solid transparent; transition: border-color .2s; }
.chips a:hover { border-color: var(--divider); }
.chips a[aria-current="page"] { background: var(--blue); color: var(--white); }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.stage { background: var(--linen-2); border-radius: var(--r-card); min-height: 520px; display: flex; flex-direction: column; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.stage-view { flex: 1; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 20px 28px 36px; flex-wrap: wrap; }
.stage-view .sheet { animation: fade .3s var(--ease); max-width: 100%; }
.stage-view .sheet svg { display: block; max-width: 100%; height: auto; }
.stage-view .sheet.white svg { outline: 1px solid var(--divider); }
.stage-view .cap { text-align: center; font-size: 12px; color: var(--grey); margin-top: 8px; }
.stage-view .sigbox { background: var(--white); padding: 28px; border-radius: var(--r-card); max-width: 560px; width: 100%; }
.panel { display: grid; gap: 16px; position: sticky; top: 24px; }
.panel .card { display: grid; gap: 14px; }
.panel h2 { font-size: 13px; font-weight: 500; color: var(--blue); }
.facts { display: grid; gap: 4px; font-size: 14px; }
.facts .k { color: var(--grey); font-size: 12px; }
.warns { display: grid; gap: 6px; }
.actions { display: grid; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--r-card); overflow: hidden; font-size: 14px; }
.table th { text-align: left; font-weight: 400; color: var(--grey); font-size: 12px; letter-spacing: .04em; padding: 12px 14px; border-bottom: 1px solid var(--divider); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--linen); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .person { display: flex; gap: 10px; align-items: center; }
.table .person .avatar { width: 30px; height: 30px; font-size: 11px; }
.table .person small { display: block; color: var(--grey); font-size: 12px; }
.table .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tablewrap { overflow-x: auto; border-radius: var(--r-card); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 47, 71, .28); z-index: 40; animation: fade .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--white); z-index: 41; padding: 28px; overflow-y: auto; animation: slide .3s var(--ease); display: grid; gap: 16px; align-content: start; }
.drawer h2 { font-weight: 300; font-size: 28px; color: var(--blue); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- brand kit ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.logo-tile { border-radius: var(--r-card); overflow: hidden; background: var(--white); }
.logo-tile .art { height: 130px; display: grid; place-items: center; padding: 24px; }
.logo-tile .art img { max-height: 40px; max-width: 80%; }
.logo-tile .art.sym img { max-height: 56px; }
.logo-tile .bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; border-top: 1px solid var(--linen); }
.flow { height: 72px; border-radius: var(--r-card); background: linear-gradient(90deg, #FFC98A 0%, #FE5000 8%, #E97862 14%, #00BFB3 22%, #005C5C 27%, #F4EFE7 31%, #DFC290 42%, #A8865C 50%, #3C4C9A 56%, #1C4A63 62%, #004F71 70%, #006198 86%, #0E2C4F 95%, #05061A 100%); }
.flow-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--grey); margin-top: 8px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { background: var(--white); border-radius: var(--r-card); overflow: hidden; border: 0; padding: 0; text-align: left; cursor: pointer; }
.swatch .chip { height: 84px; }
.swatch .info { padding: 10px 12px; font-size: 12px; line-height: 1.45; color: var(--ink); }
.swatch .info b { display: block; font-weight: 500; color: var(--text); font-size: 13px; }
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.set { background: var(--white); border-radius: var(--r-card); padding: 14px; }
.set .bars { display: grid; grid-template-columns: repeat(4, 1fr); height: 48px; border-radius: 4px; overflow: hidden; margin: 8px 0; }
.set .bars button { border: 0; cursor: pointer; }
.specimen { display: grid; gap: 6px; }
.specimen .a { font-weight: 300; font-size: 44px; line-height: 1.05; color: var(--blue); }
.specimen .b { font-weight: 500; font-size: 18px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: r; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 30px 1fr; font-size: 14px; color: var(--ink); }
.rules li::before { content: counter(r, decimal-leading-zero); color: var(--orange); font-weight: 500; }
section.block { margin-top: 36px; }
section.block > h2 { font-size: 13px; font-weight: 500; color: var(--blue); margin-bottom: 12px; letter-spacing: .02em; }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .wide { grid-column: 1 / -1; }
.photo-box { display: grid; gap: 12px; justify-items: center; text-align: center; }
.photo-box .ph { width: 168px; height: 168px; border-radius: 50%; background: var(--divider); overflow: hidden; display: grid; place-items: center; color: var(--white); font-size: 44px; font-weight: 300; }
.photo-box .ph img { width: 100%; height: 100%; object-fit: cover; }
.cropper { position: relative; width: 260px; height: 260px; border-radius: var(--r-card); overflow: hidden; background: var(--text); touch-action: none; cursor: grab; }
.cropper img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.cropper::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgba(0, 0, 0, .45); pointer-events: none; }

/* ---------- small screens ---------- */
@media (max-width: 1080px) { .studio { grid-template-columns: minmax(0, 1fr); } .stage, .panel { min-width: 0; } .panel { position: static; } .home-top { grid-template-columns: 1fr; } .profile { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .signin { grid-template-columns: 1fr; }
  .signin-side { min-height: 260px; padding: 28px 20px; }
  .signin-side .claim { font-size: 40px; margin-top: 40px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 45; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .shell.open .side { transform: none; }
  .shell.open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 47, 71, .28); z-index: 44; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--divider); position: sticky; top: 0; z-index: 30; }
  .topbar img { height: 22px; }
  main.page { padding: 24px 16px 64px; }
  .identity { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
  .form { grid-template-columns: 1fr; }
  .stage { min-height: 360px; }
  .stage-view { padding: 12px 12px 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
