/* /political-compass-maker/ page styles. Built from /assets/polyatic.css tokens only (no new fonts or theme colours).
   The four quadrant tints are the chart's own content (the saved picture's colours, compass-core.js TINTS), so the
   plane keeps them with dark ink in both themes, as a preview of the PNG. */
.nojs{margin:1.25rem 0 0;padding:0.875rem 1rem;border:1px solid var(--line);border-left:0.25rem solid var(--accent);border-radius:0.625rem;background:var(--surface);color:var(--ink);font-size:0.9375rem;line-height:1.5}
.pc-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pc-head .sub{margin-bottom:0.75rem}
@media(max-width:520px){.pc-head h1{font-size:1.625rem;margin-bottom:0.25rem}.pc-head .sub{font-size:0.9375rem;margin-bottom:0.5rem}}

/* phone: the chart first, then add / axes / save; desktop: the chart on the left, the panel on the right */
.pc-duo{display:grid;gap:1rem;align-items:start}
@media(min-width:920px){.pc-duo{grid-template-columns:minmax(0,1fr) minmax(18rem,22rem);gap:1.5rem}}
.pc-chartcard,.pc-side{min-width:0}
.pc-chartcard{display:grid;gap:0.625rem;align-content:start}
.pc-chartcard>#title{width:100%;font-weight:600}
.pc-side{display:grid;gap:1rem;align-content:start}
@media(max-width:520px){.pc-chartcard,.pc-side{padding:0.75rem}}

/* the plane: a square, four tinted quadrants, both axes, a light 20 x 20 grid */
.pc-plane{position:relative;width:100%;max-width:40rem;aspect-ratio:1;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;border:2px solid #111312;border-radius:0.25rem;overflow:hidden;color:#111312;container-type:inline-size}
@media(min-width:920px){.pc-plane{max-width:min(40rem,calc(100vh - 12rem))}}
.pc-plane::before,.pc-plane::after{content:"";position:absolute;background:#111312;pointer-events:none;z-index:1}
.pc-plane::before{left:50%;top:0;bottom:0;width:2px;margin-left:-1px}
.pc-plane::after{top:50%;left:0;right:0;height:2px;margin-top:-1px}
.pc-plane:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.pc-plane.is-target{cursor:crosshair;box-shadow:0 0 0 3px var(--accent-soft)}
.pc-plane.is-over{box-shadow:0 0 0 3px var(--accent)}
.pc-q{position:relative;pointer-events:none;background-image:linear-gradient(to right,rgba(17,19,18,.12) 1px,transparent 1px),linear-gradient(to bottom,rgba(17,19,18,.12) 1px,transparent 1px);background-size:10% 10%}
.pc-q.is-tl{background-color:#f4c0bb}.pc-q.is-tr{background-color:#b9d2f3}.pc-q.is-bl{background-color:#c4e6b6}.pc-q.is-br{background-color:#efe0a4}
.pc-qt{position:absolute;max-width:62%;font-size:max(0.625rem,2.9cqi);font-weight:600;line-height:1.2;color:rgba(17,19,18,.78);overflow-wrap:anywhere}
.is-tl .pc-qt{top:0.4rem;left:0.5rem}.is-tr .pc-qt{top:0.4rem;right:0.5rem;text-align:right}
.is-bl .pc-qt{bottom:0.4rem;left:0.5rem}.is-br .pc-qt{bottom:0.4rem;right:0.5rem;text-align:right}
.pc-word{position:absolute;z-index:2;max-width:44%;padding:0.1em 0.45em;border:1.5px solid #111312;border-radius:0.3em;background:#fff;color:#111312;font-weight:700;font-size:max(0.6875rem,3.3cqi);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.pc-word[hidden]{display:none}
.pc-word.is-top{top:1.5%;left:50%;transform:translateX(-50%)}
.pc-word.is-bottom{bottom:1.5%;left:50%;transform:translateX(-50%)}
.pc-word.is-left{left:1%;top:50%;transform:translateY(-50%);max-width:30%}
.pc-word.is-right{right:1%;top:50%;transform:translateY(-50%);max-width:30%}

/* a placed item: a zero-size anchor at the exact point, the dot on it, the word or picture above (below near the top) */
.pc-mark{position:absolute;z-index:3;width:0;height:0;margin:0;padding:0;border:0;background:none;overflow:visible;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;font:inherit;color:#111312}
.pc-dot{position:absolute;left:0;top:0;width:0.75rem;height:0.75rem;margin:-0.375rem 0 0 -0.375rem;border-radius:50%;background:#111312;box-shadow:0 0 0 2px #fff}
.pc-lab{position:absolute;left:0;bottom:0.55rem;transform:translateX(-50%);max-width:9rem;padding:0 0.2em;font-weight:700;font-size:max(0.6875rem,2.7cqi);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 2px #fff,0 0 2px #fff,0 0 3px #fff}
.pc-mark.is-below .pc-lab{bottom:auto;top:0.55rem}
.pc-mark.is-end .pc-lab{transform:translateX(calc(-100% + 0.5rem))}
.pc-mark.is-start .pc-lab{transform:translateX(-0.5rem)}
.pc-mark.is-pic .pc-lab{padding:0;width:max(2.25rem,8.5cqi);height:max(2.25rem,8.5cqi);border:2px solid #fff;outline:1.5px solid #111312;background:#fff}
.pc-lab img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.pc-mark.is-sel .pc-dot{box-shadow:0 0 0 2px #fff,0 0 0 5px var(--accent)}
.pc-mark.is-sel .pc-lab{outline:2px solid var(--accent)}
.pc-mark:focus-visible{outline:none}
.pc-mark:focus-visible .pc-dot{box-shadow:0 0 0 2px #fff,0 0 0 5px var(--accent)}
.pc-mark.is-moving{opacity:.35}

/* tray tiles */
.pc-tile{flex:none;margin:0;padding:0.25rem 0.5rem;border:1px solid var(--line-2);border-radius:0.375rem;background:var(--surface);color:var(--ink);font:inherit;font-size:0.875rem;line-height:1.25;max-width:100%;overflow-wrap:anywhere;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.pc-tile.is-pic{padding:0;width:3.5rem;height:3.5rem;overflow:hidden}
.pc-tile img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.pc-tile.is-sel,.pc-tile:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.pc-ghost{position:fixed;z-index:20;pointer-events:none;opacity:.85;transform:translate(-50%,-50%)}
.pc-ghost.pc-mark{width:0;height:0}
.pc-tray{display:flex;flex-wrap:wrap;gap:0.375rem;min-height:3.25rem;padding:0.375rem;border:1px dashed var(--line-2);border-radius:0.5rem;background:var(--surface-2)}
.pc-tray:empty::before{content:"Empty: everything is on the chart";align-self:center;padding:0 0.25rem;font-size:0.8125rem;color:var(--muted)}

.pc-side textarea{width:100%;min-height:5.5rem;font-family:var(--sans);font-size:0.9375rem}
.pc-addrow{display:flex;gap:0.5rem;margin-top:0.5rem}
.pc-addrow .btn{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center}
.pc-addrow select{flex:0 0 6.5rem}
.pc-filebtn{cursor:pointer}
#picfile:focus-visible+.pc-filebtn{outline:2px solid var(--accent);outline-offset:2px}
.pc-help{margin:0.375rem 0 0;font-size:0.8125rem;line-height:1.5;color:var(--muted)}
.pc-help:empty{display:none}
.pc-help code{font-family:var(--mono);font-size:0.75rem}
.pc-chartcard .pc-help{margin:0}
.pc-selrow{display:flex;flex-wrap:wrap;gap:0.375rem}
.pc-selrow[hidden]{display:none}
.pc-starters{display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem}
.pc-axes{display:grid;grid-template-columns:1fr 1fr;gap:0.375rem 0.5rem}
.pc-axes label{display:grid;gap:0.125rem;font-size:0.8125rem;color:var(--muted)}
.pc-axes input{width:100%;min-width:0;color:var(--ink)}
.pc-quads{margin-top:0.625rem}
.pc-quads summary{cursor:pointer;font-size:0.875rem;color:var(--ink-2);margin-bottom:0.375rem}
.pc-clear{margin-top:0.625rem}
@media(prefers-reduced-motion:reduce){.pc-ghost{transition:none}}
