:root{--forest:#173f2d;--forest-2:#285f43;--sage:#91a371;--sage-line:#bdc6aa;--ivory:#fbfaf6;--paper:#fffdf8;--warm-line:#dfd1bf;--content:1330px;--shadow:0 5px 18px rgb(42 63 45 / 6%)}
html{background:var(--ivory)}
body{position:relative;color:var(--forest);background:var(--ivory) url("./botanical-corner.svg") no-repeat left 55vh/clamp(150px,17vw,280px) auto}
body::after{content:"";position:fixed;z-index:-1;right:-35px;top:105px;width:260px;height:320px;opacity:.5;background:url("./botanical-corner.svg") center/contain no-repeat;transform:scaleX(-1);pointer-events:none}
.header-inner,main,.site-footer{width:min(80%,var(--content));max-width:var(--content);margin-inline:auto}
.site-header{min-height:94px;padding:0;border:0;color:#fff;background:linear-gradient(108deg,#244f38,#173f2d);box-shadow:none}
.site-header::after{display:none}.header-inner{min-height:94px}.brand-lockup{gap:.8rem}.brand-lockup .eyebrow{display:none}
.brand-mark{width:82px;height:82px;padding:3px;border:2px solid rgb(255 255 255 / 88%);border-radius:50%;overflow:hidden;background:#fffdf8;box-shadow:0 2px 8px rgb(0 0 0 / 10%)}.brand-mark img{width:100%;height:100%;object-fit:contain}
.site-header h1{gap:1rem;margin:0;font-size:clamp(1.05rem,1.4vw,1.3rem)}.brand-script{font-size:clamp(2.8rem,4vw,3.35rem)}
.header-actions{gap:1rem}.community-summary{color:#fffdf6;font-size:.95rem;letter-spacing:.02em}
.site-header .button.secondary:not(.hidden){position:relative;min-width:76px;margin-left:58px;border-radius:18px;color:var(--forest);background:#fffdf8}
.site-header .button.secondary:not(.hidden)::before{content:"";position:absolute;top:50%;left:-58px;width:48px;height:48px;border:3px solid #fff;border-radius:50%;background:#fffdf8 url("./ngai-mark.png") center/92% no-repeat;transform:translateY(-50%)}
main{margin-top:1.15rem;margin-bottom:1.25rem}
.community-bar{grid-template-columns:1.1fr repeat(3,minmax(0,1fr));align-items:center;gap:clamp(1rem,2.4vw,2.8rem);min-height:128px;margin-bottom:.8rem;padding:1rem clamp(1.5rem,3vw,3rem);border:1px solid var(--sage-line);border-radius:15px;color:var(--forest);background:linear-gradient(105deg,rgb(249 248 241 / 96%),rgb(245 246 237 / 96%));box-shadow:none}
.community-bar>div{position:relative;align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding-right:2.4rem;border-right:1px dashed #98a376}
.community-bar>div::after{content:"";position:absolute;right:-15px;top:50%;width:29px;height:38px;background:#f7f7ef url("./leaf-sprig.svg") center/contain no-repeat;transform:translateY(-50%)}
.community-bar strong{font-size:1.05rem}.community-bar span{font-size:.85rem}.community-bar label{gap:.4rem;margin:0;font-size:.93rem}
.community-bar select{min-height:50px;padding:.55rem 2.4rem .55rem 2.55rem;border:1px solid #b9c2aa;border-radius:11px;background:#fffefa url("./leaf-sprig.svg") no-repeat .65rem center/23px}
.admin-badge{display:block;width:100%;margin:.35rem 0 .15rem;padding:.2rem .7rem;border-radius:999px;color:#fff!important;background:linear-gradient(90deg,#79936c,#a7b284)}
.tabs{gap:1rem;margin-bottom:.8rem}.tab{min-height:50px;padding:.65rem 1rem;border:1px solid var(--warm-line);border-radius:12px;color:var(--forest);background:rgb(255 253 248 / 92%);box-shadow:none;font-size:1rem}
.tab::before{content:"";display:inline-block;width:22px;height:22px;margin-right:.5rem;vertical-align:-.35rem;background:url("./leaf-sprig.svg") center/contain no-repeat}.tab:hover{border-color:var(--sage)}
.tab.active{border-color:var(--forest-2);color:#fff;background:linear-gradient(105deg,#2c6546,#25593e);box-shadow:none}.tab.active::before{filter:brightness(0) invert(1);opacity:.9}.count-badge{min-width:1.45rem;height:1.45rem;margin-left:.25rem;padding:0 .35rem;color:#4d3600;background:#f2a900}
.card{padding:clamp(1.4rem,2.3vw,2rem);border:1px solid var(--warm-line);border-radius:15px;background:rgb(255 253 248 / 94%);box-shadow:var(--shadow)}
.section-heading{position:relative;padding-bottom:1rem;border-bottom:1px dashed #a5ad7d}.section-heading::before,#new-view>h2::before{content:"";flex:0 0 auto;width:42px;height:62px;background:url("./leaf-sprig.svg") center/contain no-repeat;transform:rotate(-16deg)}
.section-heading::after,#new-view>h2::after{content:"";position:absolute;left:50%;bottom:-17px;width:94px;height:34px;background:var(--paper) url("./floral-divider.svg") center/170px auto no-repeat;transform:translateX(-50%)}
.section-heading>div{flex:1}.section-heading .eyebrow{margin-bottom:.1rem;color:var(--forest-2);font-size:.92rem;letter-spacing:.03em}.section-heading h2{margin:0;padding:0;border:0;font-size:clamp(1.55rem,2.2vw,2rem)}
.section-heading h2::before,.section-heading h2::after{display:none}.section-heading .button.secondary{min-width:128px;border:1px solid #849777;color:var(--forest);background:#fbfbf5}.section-heading .button.secondary::before{content:"↻";margin-right:.45rem;font-size:1.35rem;vertical-align:-.08rem}
#new-view>h2{position:relative;display:flex;align-items:center;gap:.7rem;margin:0 0 1.25rem;padding:0 0 1rem;border-bottom:1px dashed #a5ad7d;font-size:clamp(1.45rem,2vw,1.8rem)}#new-view>h2::before{display:block;position:static;inset:auto;flex:0 0 42px;margin:0;transform:rotate(-10deg)}.record-destination{display:none}
input,textarea,select{border:1px solid #b9c3ad;border-radius:11px;background-color:rgb(255 255 252 / 94%);box-shadow:inset 0 1px 2px rgb(31 75 53 / 2%)}
#accounts-view{min-height:380px}#accounts-view .admin-grid{grid-template-columns:1fr 1fr;gap:1.6rem;margin-top:2.35rem}#accounts-view .admin-grid input,#accounts-view .admin-grid select{min-height:60px}#account-search{padding-right:3rem;background-image:url("./leaf-sprig.svg");background-repeat:no-repeat;background-position:right .8rem center;background-size:25px}
#accounts-status:not(:empty){display:flex;align-items:center;gap:1rem;min-height:110px;margin:.8rem 0 0;padding-left:12%;color:#2f3d34}#accounts-status:not(:empty)::before{content:"";flex:0 0 54px;width:54px;height:54px;border:1px dashed var(--sage);border-radius:50%;background:url("./leaf-sprig.svg") center/31px no-repeat}.account-list{margin-top:.8rem}
#new-view form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(340px,.82fr);gap:0 1.25rem}#new-view form>label{grid-column:1/3;margin-bottom:.55rem}#new-view #record-tribe-field{grid-column:1;grid-row:1}#new-view #record-tribe-field+label{grid-column:2;grid-row:1}#new-view .form-grid{grid-column:1/3;grid-row:2;gap:1rem}
#new-view form>label:has(#recorded-date){grid-row:3}#new-view form>label:has(#indigenous-text){grid-row:4}#new-view form>label:has(#translation){grid-row:5}#new-view form>label:has(#notes){grid-row:6}#new-view input,#new-view select{min-height:40px;padding:.45rem .75rem}#new-view textarea{min-height:48px;height:48px;padding:.55rem .75rem;resize:vertical}
#new-view label:has(input:not([type=checkbox])),#new-view label:has(textarea){position:relative}#new-view label:has(input:not([type=checkbox]))::after,#new-view label:has(textarea)::after{content:"";position:absolute;right:.5rem;bottom:.55rem;width:21px;height:21px;background:url("./leaf-sprig.svg") center/contain no-repeat;pointer-events:none}
#new-view .audio-panel,#new-view .photo-panel,#new-view .rights-panel{grid-column:3;margin:0 0 .6rem;padding:.75rem 1rem;border:1px solid var(--warm-line);border-radius:14px;background:rgb(251 250 245 / 95%)}#new-view .audio-panel{grid-row:1/span 3;display:flex;flex-direction:column;min-height:205px}#new-view .photo-panel{grid-row:4/span 2}#new-view .rights-panel{grid-row:6}
#new-view .audio-panel legend,#new-view .photo-panel legend,#new-view .rights-panel legend{padding:0 .4rem;color:var(--forest);font-size:.98rem}#new-view .audio-panel legend::before,#new-view .photo-panel legend::before{content:"";display:inline-block;width:20px;height:20px;margin-right:.4rem;vertical-align:-.3rem;background:url("./leaf-sprig.svg") center/contain no-repeat}
#new-view .audio-state{order:1;display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:112px;text-align:center}#new-view .audio-intro{order:2;margin:0;padding-top:.55rem;border-top:1px dashed #b3b996;font-size:.78rem}#new-view #start-recording{justify-self:center;width:72px;height:72px;padding:.4rem;border-radius:50%;color:#fff;background:#f0a800}#new-view #choose-audio,#new-view #choose-photo{border:1px solid #6f8d70;color:var(--forest);background:#fbfaf4}
#new-view .photo-panel p{margin:.35rem 0 0;font-size:.8rem}#new-view .rights-panel .consent-check{margin:0;padding:.2rem 0;background:transparent;font-size:.85rem}#new-view #save-record{grid-column:1/4;min-height:46px;margin-top:.1rem}#new-view #save-status{grid-column:1/4}
.site-footer{position:relative;max-width:none;margin-top:1.8rem;padding:3.4rem 1rem 1.4rem;border:0;color:#4d5e52}.site-footer::before{content:"";top:0;left:50%;width:100vw;height:58px;color:transparent;background:url("./floral-divider.svg") center top/240px 52px no-repeat,linear-gradient(to bottom,transparent 25px,#a8b596 25px,#a8b596 26px,transparent 26px);transform:translateX(-50%)}.site-footer p{margin:.25rem 0}
@media(max-width:1100px){.header-inner,main,.site-footer{width:min(92%,var(--content))}.community-bar{grid-template-columns:1fr 1fr 1fr;gap:1rem}.community-bar>div{grid-column:1/-1;padding:0 0 .8rem;border-right:0;border-bottom:1px dashed #98a376}.community-bar>div::after{right:50%;top:auto;bottom:-19px;transform:translateX(50%) rotate(90deg)}#new-view form{grid-template-columns:1fr 1fr}#new-view .audio-panel,#new-view .photo-panel,#new-view .rights-panel{grid-column:1/3;grid-row:auto}#new-view #save-record,#new-view #save-status{grid-column:1/3}}
@media(max-width:760px){.header-inner,main,.site-footer{width:calc(100% - 1rem)}.header-inner{min-height:82px}.brand-mark{width:62px;height:62px}.brand-script{font-size:2.2rem}.header-actions{max-width:none}.site-header .button.secondary:not(.hidden){margin-left:0}.site-header .button.secondary:not(.hidden)::before{display:none}.community-bar{grid-template-columns:1fr;min-height:0;padding:1rem}.community-bar>div,.community-bar label{grid-column:1}.tabs{display:grid;grid-template-columns:1fr 1fr;overflow:visible}.tab{min-width:0}.section-heading{align-items:flex-start}.section-heading::before{width:34px;height:48px}#accounts-view .admin-grid{grid-template-columns:1fr;gap:.2rem;margin-top:2rem}#accounts-status:not(:empty){padding-left:4%}#new-view form{display:block}#new-view .audio-panel,#new-view .photo-panel,#new-view .rights-panel{margin-top:.8rem}#new-view #save-record{position:static;width:100%}.site-footer{padding-top:3rem}}
@media(max-width:480px){body{background-size:130px auto}.site-header h1{gap:.45rem}.site-header h1>span:last-child{font-size:.82rem}.tabs{gap:.55rem}.tab{min-height:46px;padding:.5rem .3rem;font-size:.88rem}.tab::before{width:18px;height:18px;margin-right:.25rem}.card{padding:1rem}.section-heading{flex-wrap:wrap}.section-heading .button.secondary{margin-left:auto}#accounts-status:not(:empty){align-items:flex-start;padding:1rem 0}}

/* Record taxonomy, community and word/sentence relationships */
#new-view #record-community-field{grid-column:1;grid-row:2}
#new-view #record-type-field{grid-column:2;grid-row:2}
#new-view .form-grid{grid-row:3}
#new-view form>label:has(#recorded-date){grid-row:4}
#new-view form>label:has(#indigenous-text){grid-row:5}
#new-view form>label:has(#translation){grid-row:6}
#new-view form>label:has(#notes){grid-row:7}
#new-view .sentence-links-panel{grid-column:1/3;grid-row:8}
#new-view .audio-panel{grid-row:1/span 4}
#new-view .photo-panel{grid-row:5/span 2}
#new-view .rights-panel{grid-row:7/span 2}
#new-view #save-record{grid-row:9}#new-view #save-status{grid-row:10}
.sentence-links-panel{margin:.45rem 0 .8rem;padding:.9rem 1rem;border:1px solid var(--warm-line);border-radius:12px;background:#faf9f2}
.sentence-links-panel legend{padding:0 .4rem;color:var(--forest);font-weight:800}
.sentence-word-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;max-height:220px;overflow:auto}
.word-link-option{display:flex;align-items:flex-start;gap:.55rem;margin:0;padding:.55rem .65rem;border:1px solid #d5dac8;border-radius:9px;background:#fffefa;font-weight:600}
.word-link-option input{flex:0 0 auto;width:auto;min-height:0;margin-top:.2rem}
.record-type-badge{display:inline-block;padding:.2rem .55rem;border-radius:999px;color:#fff;font-size:.76rem;font-weight:900;background:#738b61}
.record-type-badge.sentence{background:#a66d24}.record-type-badge.song{background:#8d536d}
.record-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem 1rem;margin-top:1rem}.record-filter-grid label{margin:0}.record-filter-grid input,.record-filter-grid select{min-height:48px}.word-link-option.is-new{border-style:dashed;background:#fff8df}.word-link-option.is-new span{color:#78550b}.word-link-option.is-existing{background:#f3f7ee}
.record-relations{margin-top:1.2rem;padding:1rem;border:1px solid #d7d9c7;border-radius:12px;background:#f7f7ef}
.relation-list{display:flex;flex-wrap:wrap;gap:.55rem}.relation-link{padding:.5rem .75rem;border:1px solid #91a27d;border-radius:999px;color:var(--forest);background:#fffefa;font-weight:700}.relation-link:hover{background:#edf2e7}
#new-view #record-community-field{grid-column:1;grid-row:2}#new-view #record-type-field{grid-column:2;grid-row:2}#new-view .form-grid{grid-row:3}#new-view form>label:has(#recorded-date){grid-row:4}#new-view form>label:has(#indigenous-text){grid-row:5}#new-view form>label:has(#translation){grid-row:6}#new-view form>label:has(#notes){grid-row:7}#record-community,#edit-community-name{appearance:auto;padding-right:2.2rem}
@media(max-width:1100px){#new-view form>*{grid-row:auto!important}#new-view #record-community-field{grid-column:1}#new-view #record-type-field{grid-column:2}#new-view .sentence-links-panel{grid-column:1/3}.sentence-word-options{grid-template-columns:1fr 1fr}.record-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.sentence-word-options{grid-template-columns:1fr}.record-relations{padding:.75rem}.record-filter-grid{grid-template-columns:1fr}}
